Forum Discussion
67nmark
Helper I
2 years agoMake running total conditional on a slicer selection
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...
Anonymous
2 years agoNot applicable
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