Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
Hello,
I'm struggling to make a running total measure that works with a slicer selection and am hoping someone can put me on the right track. The problem is I need a single measure that works when I either select a value in a slicer or have no value selected. At the moment, I have created 2 measures, measure 1 works when a xpm_invoices[Invoiced Amount] slicer value is selected (but not when no value is selected). Measure 2 works when no xpm_invoices[Invoiced Amount] slicer value is selected (but not when a value is selected). I'd be very grateful for some assistance with this if anyone can help.
Cheers,
Mark
TotalAmountByClientGroup = SUM(xpm_invoices[Invoiced Amount])
Measure 1 =
Hi @67nmark ,
Can you provide a .pbix file without sensitive data, or provide simple data and show the expected results in pictures? If possible, I would also like to know which slicers are used and which fields are used in the visual.
How to provide sample data in the Power BI Forum - Microsoft Fabric Community
Since I don't have enough information, I can only think of one possible solution.
Use the following DAX expression to create a measure
Measure 3 =
var _A = CALCULATE(COUNTROWS(VALUES('xpm_invoices'[Invoiced Amount])),ALL('xpm_invoices'))
VAR _B = CALCULATE(COUNTROWS(VALUES('xpm_invoices'[Invoiced Amount])),ALLSELECTED('xpm_invoices'))
RETURN IF(_B <> _A,[Measure 1],[Measure 2])
Best Regards,
Wenbin Zhou
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 9 | |
| 5 | |
| 4 | |
| 3 | |
| 3 |
| User | Count |
|---|---|
| 23 | |
| 12 | |
| 11 | |
| 9 | |
| 8 |