Forum Discussion

Tom_Y's avatar
Tom_Y
Advocate II
2 years ago
Solved

Context filtering

I'm a begginner learning "context filtering".

[Filter Red] is a Calculated Column. Other 3 columns are mannually input. What's the logic behind it's showing answers in rows with colour Orange???

Thanks in advance.

 

  • You are basically doing this:

    Ignore the row I'm in (use of calculate) then create a new context by filtering column colour by the value "Red". If this is done, take the total of the count column.

  • Tom_Y Try this Dax:

    Filter Red = If('Table'[Color] = "Red", CALCULATE(sum('Table'[Count]), 'Table'[Color] = "Red"), BLANK())

2 Replies

  • You are basically doing this:

    Ignore the row I'm in (use of calculate) then create a new context by filtering column colour by the value "Red". If this is done, take the total of the count column.

  • Tom_Y Try this Dax:

    Filter Red = If('Table'[Color] = "Red", CALCULATE(sum('Table'[Count]), 'Table'[Color] = "Red"), BLANK())