NEWUX: Dynamic Time Period Filter based off Line Item Selected


I am building a chart where users can select a line item as a selector on the chart and the values will display over time. However there a many time periods currently showing for certain line items with no data. I would like a way to dynamically filter to show periods from the first period containing a non zero value to the last period with non zero data. The module has one hierarchical dimension (Available as a selector on the page) and time


The logic would be basically if this line item is selected than show periods from the first non zero period to the last non zero period . Not sure how to build this in the model or design in the newUX. Is there a workaround anyone has found? 

Best Answer

  • Soumya Bhattacharya


    If I understood correctly you are looking for something like below,

    Say there are two-line items below,


    - There are Zero and Non-Zero data points at different Line items for different Time periods.

    - There is a hierarchical dimension say as Region-Country this will be present in the page selector.

    - Chart should filter Time periods based on Line-item and dimension selection.


    Now, If we publish the chart in New UX it should look like below,

    Volume 1: Only for the months that has nonzero values



    Volume 2: Only for the months that has nonzero values



    Steps 1: Create one Line-Item Subset using the Chart Module.



    Step 2: Create another module which uses the LIS as its dimension to pull the value in the line item using collect().


    Step 3: Create another line item as Filter to only show non zero values.

    Step 4: Populate the chart using the Chart Module - LIS Module in the new UX and show/hide the volume line in the UX page.


    Step 5: Apply the line-item filter in the UX page Coulmns.



    Limitations to this approach

    • As we are suing LIS hence the line items need to be number formatted.
    • Line items one as Numeric number and another as percentage is not possible.
    • Line-item Number Format can only be of one type. (Example Volume 1 Decimal place at 2 digit and Volume 2 Decimal place at 3 or 4 digit is not possible.)

    Please refer to detail LIS explanation in Anapedia for reference. Let know if that clarifies.




  • You could try:
    Line Item 1: CUMULATE(Volume 1 + Volume 2)
    Line Item 2: Line Item 1 <> 0 and PREVIOUS(Line Item 1) <> Line Item 1[SELECT: TIME.All Periods]
    Then use Line Item 2 to filter your chart.