Forum Discussion
Calculate measure based on filter through DAX
Hi ,
I have a visual , something like this
This YTD changes value depending upon the value selected in the slicer which is coming froma table "_Sort_Summary". for example if someone selects "Case" , it will show YTD for Case, if some one slected "Volume", it will show YTD for Volume.
2 Replies
- amitchandak
Super User
Anonymous , based on what I got
_NSR_filtered_Measure_YTD =
VAR M= "Net Surgery Revenue"
RETURN
TOTALYTD( CALCULATE(SUM(_Pivot_Summary[Value]),REMOVEFILTERS('_Sort_Summary'), FILTER(all(_pivot_Summary), _Pivot_Summary[Attribute]= M)), 'Calendar'[Date])If this does not help
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.- AnonymousNot applicable
amitchandak Thanks for your response. I see value now but value does not seems to be correct. Looks like its aggregating but I am not undersatnding on what level. Values should look like "YTD" in the screen shot