Forum Discussion
Data Source change based on slicer
Dear Friends
I have two excel file(have same format), one contains data upto last week and other contain data upto this week, i have many visual in my report .
i need to analyse report based on last week or this week dynamically
i need to change data source based on on slicer selection(dynamic) : Last week and This week
How can i achieve this
data upto this week:
data upto last week:
Slicer be like:
Thanks
Jyaul
3 Replies
- amitchandakSuper User
Anonymous , if you have a date based on the selection
Measure =
var _max = today() + 7-1*WEEKDAY('Date'[Date],2) //this week end
return
countrows(filter(Table, Table[Date] <=_max))
Measure till last weekend =
var _max = today() + 7-1*WEEKDAY('Date'[Date],2) -7 //till last week end
return
countrows(filter(Table, Table[Date] <=_max))
Use these measures with other un summarized data
Power BI — Week on Week and WTD
https://medium.com/@amitchandak.1978/power-bi-wtd-questions-time-intelligence-4-5-98c30fab69d3
https://community.powerbi.com/t5/Community-Blog/Week-Is-Not-So-Weak-WTD-Last-WTD-and-This-Week-vs-Last-Week/ba-p/1051123
https://www.youtube.com/watch?v=pnAesWxYgJ8- AnonymousNot applicable
Dear,
Thanks for your response but i don't have date based column
- AnonymousNot applicable
Hi Anonymous
You can create a custom column to judge the data up to last week and up to this week . Then add a slicer with the custom column. Using this scheme, you can use the slicer to judge the data of last week and this week.
Best Regard
Community Support Team _ Ailsa Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.