Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Thank you in advance for your help.
How can I accomplish this?
Users want to select values from the slicer and get cumulative results for the chosen measures. For instance, selecting ‘atRisk’ and ‘overdue’ should return the sum of both. Selecting only ‘atRisk’ should return just its value. Here's an example:
| dataTable | |||
| projectName | atRisk | remaining | overdue |
| p_AAA | 5 | 10 | 2 |
| p_BBB | 3 | 14 | 2 |
| p_CCC | 2 | 18 | 3 |
| p_DDD | 9 | 14 | 4 |
| Measures |
| atRisk = Sum(dataTable[atRisk] ) |
| remaining = Sum(dataTable[remaining] ) |
overdue = Sum(dataTable[overdue] ) |
| Slicer |
| atRisk |
| remaining |
| overdue |
| Scenarios |
| Scenario #1: User selects 'atRisk' from the Slicer |
| Scenario #2: User selects 'atRisk' and 'overdue' from the Slicer |
| Scenario #3: User selects 'atRisk' and 'overdue' and 'remaining' from Slicer |
| Expected Results | |||
| projectName | Scenario #1 | Scenario #2 ('atRisk' + 'overdue') | Scenario #3 ('atRisk' + 'overdue' + 'remaining') |
| p_AAA | 5 | 7 | 17 |
| p_BBB | 3 | 5 | 19 |
| p_CCC | 2 | 5 | 23 |
| p_DDD | 9 | 13 | 17 |
Solved! Go to Solution.
Add a table for the slicer
Options=
Datatable(
"Option", string,
{{"atRisk"}, {"overdue"}, {"remaining"}}
)
And the measure
Measure =
If( "atRisk" in values( options[option]), [atRisk])
+
If( "overdue" in values( options[option]), [overdue])
+
If( "remaining" in values( options[option]), [remaining])
Hi @Anonymous
Please find the attached PBIX file.
I have calculated table for slicer and one measure for cumulative sum
Proud to be a Super User! | |
Add a table for the slicer
Options=
Datatable(
"Option", string,
{{"atRisk"}, {"overdue"}, {"remaining"}}
)
And the measure
Measure =
If( "atRisk" in values( options[option]), [atRisk])
+
If( "overdue" in values( options[option]), [overdue])
+
If( "remaining" in values( options[option]), [remaining])
Thank you.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!