Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi
Hi @heidibb
I make a test as below:
1. create a table, have no relatiponship with other table
program slicer = VALUES('Table'[program])
2. create measures
Assume sum(success)/sum(studentcount)
sum(success)->count of stutents who's scores larger or equal to 3
sum(studentcount)->all count of students
selected pro = IF(SELECTEDVALUE('program slicer'[program])=MAX('Table'[program]),1,0) countall of stutents = CALCULATE(DISTINCTCOUNT('Table'[stu.no]),ALL('Table')) success count = CALCULATE(DISTINCTCOUNT('Table'[stu.no]),FILTER('Table','Table'[score]>=3)) selected = CALCULATE([success count],FILTER(ALL('Table'),[selected pro]=1))/[countall of stutents] NO selected = CALCULATE([success count],FILTER(ALL('Table'),[selected pro]=0))/[countall of stutents]
Hi @heidibb
Could you give more details how to caluclate sum(success)/sum(studentcount)?
There are some useful acrticles you could refer to for the scenario below
https://exceleratorbi.com.au/items-not-selected-slicer/
https://www.daxpatterns.com/basket-analysis/#downloads
Hi @heidibb
It would help if you provide some sample data (in tabular format).
You could create a dynamic table within your measure along the lines of:
VAR AuxTable_ = EXCEPT(ALL(Table1); Table1)
where Table1 is your table. AuxTable_ will have all the rows that are not included in the slicer. You can then operate with AuxTable_
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
113 | |
103 | |
76 | |
66 | |
63 |
User | Count |
---|---|
142 | |
105 | |
102 | |
81 | |
68 |