Forum Discussion

a__miller's avatar
a__miller
Frequent Visitor
4 years ago

Filter showing multiple values

Hi, the filter is showing multiple values when it is only supposed to show the value when the Week Offset equals 0. Is there something wrong with the measure?

 

 

4 Replies

  • Hi, a__miller ,

     

    I can figure out two possibilities:

    1. The measure "Cumulative Past Due Backlog - WHSL" was written with REMOVEFILTERS() ou ALL().
    In this case, instead of filtering the measure using a boolean expression, you could use it inside a FILTER as following:

    CALCULATE( [Cumulative Past Due Backlog - WHSL], FILTER( 'Calendar'[Week Offset] IN {0})

     

    2. The relationship between table 'Calendar' and the table from where the values of the measure "Cumulative Past Due Backlog - WHSL" come from is broken or need to be edited.

     

    Regards

     

  • Hi,

    Ensure that Fical Year, Week offset and Period have all been dragged from the Calendar Table.  There should be a relationship (Many to One and Single) between the Date column of the Data Table to the Date column of the Calendar Table.  You may simplify your measure to:

    = CALCULATE([Cumulative Past Due Backlog - WHSL],'Calendar'[Week Offset]=0)

    Hope this helps.

  • a__miller's avatar
    a__miller
    Frequent Visitor

    Thank you for your replies! 

     

    Ashish_MathurFical Year, Week offset and Period have been dragged from the Calendar Table, and there is a One to Many Relationship between the Calendar Date Column and the Date Column in the Backlog table. 

     

    flath , The Updated Past Due Backlog measure's goal is to filter Cumulative Past Due Backlog into the current Fiscal Period (Currently in Period 6).  Below is a snapshot of the values that feed the Updated Past Due Backlog Measure. Here is the Cumulative Past Due Backlog Measure.  The values are only duplicated within the current period, and are filtered out of other fiscal periods. 

     

    WHSL Cumulative Past Due Backlog =
    CALCULATE(
        [WHSL - Past Due Open Backlog],
        FILTER(
            ALLSELECTED('Calendar'[Date]),
            ISONORAFTER('Calendar'[Date], MAX('Calendar'[Date]), DESC)
        )
    )

     

     

     

    Unfortunately, adding FILTER in the measure creates an error