Forum Discussion
Display Data for Last 3 months based on slicer selection
- 6 years ago
Anonymous you have to use disconnected table for this purpose, create a table for slicer and use value from that table to filter the data in your main table using TREATAS
Measure = VAR __dateRange = DATESINPERIOD ( DateDisconnected[Date], MAX( DateDisconnected[Date] ), -3, MONTH ) RETURN CALCULATE ( SUM ( Table[Amount] ), TREATAS ( __dateRange, DateTable[Date] ) )I haven't tested this but it will get you started if you are unable to figure out, share sample pbix file and can take a look.
I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!
⚡Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.⚡
Anonymous you have to use disconnected table for this purpose, create a table for slicer and use value from that table to filter the data in your main table using TREATAS
Measure =
VAR __dateRange = DATESINPERIOD ( DateDisconnected[Date], MAX( DateDisconnected[Date] ), -3, MONTH )
RETURN
CALCULATE ( SUM ( Table[Amount] ), TREATAS ( __dateRange, DateTable[Date] ) )
I haven't tested this but it will get you started if you are unable to figure out, share sample pbix file and can take a look.
I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!
⚡Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.⚡
Thanks parry2k .
Anonymous
I am hoping New version of reltive date slicer will come with date and will address this. I can see that already in progress. Not sure they are planning to give date in that.
https://ideas.powerbi.com/ideas/idea/?ideaid=37cf4112-bb85-44fe-ba0d-188517c39a2b