Forum Discussion
Changing slicer condition to AND
- 4 years ago
WOLFIE , Try Measure
measure =
var _cnt = calculate(DistinctCount('Table'[Rule]) ,allselected('Table'))
return
countx(filter(summarize('Table', 'Table'[ID], "_1", DistinctCount('Table'[Rule])),[_1]=_cnt),[ID])or
measure =
var _cnt = calculate(DistinctCount('Table'[Rule]) ,allselected('Table'))
return
calculate(countx(filter(summarize('Table', 'Table'[ID], "_1", DistinctCount('Table'[Rule])),[_1]=_cnt),[ID]), filter(allselected(Table), Table[ID] =max(Table[ID]))) - 4 years ago
amitchandak Quick additional question 🙂 I need the table to keep all values when nothing is selected in the slicer. I tried this, but it doesn't work:
measure =VAR _cnt = CALCULATE(DISTINCTCOUNT('Customer'[Rule]) ,ALLSELECTED('Customer'))RETURNIF(ISFILTERED(Customer),CALCULATE(COUNTX(FILTER(SUMMARIZE('Customer', 'Customer'[ID], "_1",DISTINCTCOUNT('Customer'[Rule])),[_1]=_cnt),[ID]),FILTER(ALLSELECTED(Customer),'Customer'[ID] = MAX('Customer'[ID]))),1)
WOLFIE , Try Measure
measure =
var _cnt = calculate(DistinctCount('Table'[Rule]) ,allselected('Table'))
return
countx(filter(summarize('Table', 'Table'[ID], "_1", DistinctCount('Table'[Rule])),[_1]=_cnt),[ID])
or
measure =
var _cnt = calculate(DistinctCount('Table'[Rule]) ,allselected('Table'))
return
calculate(countx(filter(summarize('Table', 'Table'[ID], "_1", DistinctCount('Table'[Rule])),[_1]=_cnt),[ID]), filter(allselected(Table), Table[ID] =max(Table[ID])))
- WOLFIE4 years ago
Helper I
The second one works! 🙂 Thanks so much!!!