Forum Discussion
help on filtering
hi all,
need some advice here on the chart filtering.
i have 3 measure calculated using the filtering
next i need to use the above measure to do further % change calculation.
however i got blank, i think it got to do with filtering but doesnt get the correct value.
Can anyone advice? Thank you.
Please check the file.
https://www.dropbox.com/s/3svdbxr8akcfctc/filter.pbix?dl=0
Issues are with the data type.
10 Replies
- amitchandakSuper User
The last 12-months table cal has issues.
You were able to see data because you have stopped time filter on that visual.
Please see if this calculation suffices your needs.
Last 12 Mths New = VAR _Curr_start = Maxx(dates,DATEADD(STARTOFMONTH(Dates[Date]),-11,MONTH)) VAR _Curr_END = Max(Dates[Date]) Return CALCULATE(sum(DATA1[Value]),ALL(DATA1),DATA1[Date]>=_Curr_start && DATA1[Date]<=_Curr_END)
https://www.dropbox.com/s/3svdbxr8akcfctc/filter.pbix?dl=0
- AnonymousNot applicable
amitchandak but the values are wrong are the new last 12 mths?
- amitchandakSuper User
Calc of 12 month is correct. Currently, the calendar end date is 31-Dec-2019. So max of that has been taken. Now there two options.
1. when you have a slicer, it will respond to that. I checked it
2. Or in the max, you can use the max of sales date.
- v-eachen-msftCommunity Support
Hi Anonymous ,
You can try this measure.
Last 12 Mths New = VAR _Curr_start = MAXX ( DATA1, DATEADD ( STARTOFMONTH ( DATA1[Date1] ), -11, MONTH ) ) VAR _Curr_END = MAX ( DATA1[Date1] ) RETURN SUMX ( FILTER ( ALL ( DATA1 ), DATA1[Date1] >= _Curr_start && DATA1[Date1] <= _Curr_END && DATA1[Product] = SELECTEDVALUE ( DATA1[Product] ) ), DATA1[Value] )Here is the result.
- AnonymousNot applicable
- amitchandakSuper User
Please check the file.
https://www.dropbox.com/s/3svdbxr8akcfctc/filter.pbix?dl=0
Issues are with the data type.