Forum Discussion
Aggregation and dynamic filter
- 8 years ago
Ok I think I've made this work using:
0Measure = CALCULATE( SUM(Table1[Data]), FILTER(ALLSELECTED(Table1),Table1[Level1]=MAX(Table1[Level1])) )But can anyone explain what MAX(Table1[level1]) is doing in the filter.... do not understand especially as MAX is supposed to ignore Booleans and Text, and in this case Level1 has string fields....
- Anonymous8 years ago
dusiod,
Calculated columns will not respond to slicer selection, this is why your first DAX doesn't work with Level 2 filter. See this Power BI KB.
You eventually create a measure, which works correctly with level 2 filter. The max() function in the measure has similar effect as the EARLIER() function, it will check if your rows share same level1 value, and will result in your measure to sum data based on same level1.
Regards,
Lydia
dusiod,
Calculated columns will not respond to slicer selection, this is why your first DAX doesn't work with Level 2 filter. See this Power BI KB.
You eventually create a measure, which works correctly with level 2 filter. The max() function in the measure has similar effect as the EARLIER() function, it will check if your rows share same level1 value, and will result in your measure to sum data based on same level1.
Regards,
Lydia