Forum Discussion
Problem with Understanding AllSELECTED
Hi HarsimranPWRBI ,
Try inserting a var and a return. You need to capture that value outside of the CALCULATE. Also the test is less than or equal. You will have to put back in your table name and measure name.
Let me know if you have any questions.
If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos are nice too.
Nathaniel
Running Total (AllSELECTED ) Of Quantity =
VAR _ddate =
MAX ( 'Calendar'[Date] )
RETURN
CALCULATE (
[Total Quantity],
FILTER ( ALLSELECTED ( 'Calendar' ), 'Calendar'[Date] <= _ddate ) //Less than or equal to
)
- HarsimranPWRBI6 years agoHelper I
Hi Nathaniel_C ,
Thanks for the reply but this one is same expression shared in post without variable.
To be more specific, i'm looking for alternate for ALLSELECTED(table) with ALLSELECTED(<column>,..) that can help me achieve same result.
Just to add more info, i'm using Date hierarchy in Visual and CY label as slicer & while using below code for measure in visual does not re-initiate running total for selected CY
Running Total (AllSELECTED Date) Of Quantity = CALCULATE([Total Sales Quantity], FILTER( ALLSELECTED('Dimension Date'[Date]) ,MAX('Dimension Date'[Date])>='Dimension Date'[Date] ) )Thanks,
Harry