Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi,
New to Power Bi and I am looking to create a filter / button(s) that when selected will either filter by 4, 12 or 52 weeks based on the max date in the data set and not today().
Data is in a simple format:
Date | Value |
26 January 2020 | 86018000 |
23 February 2020 | 85389000 |
22 March 2020 | 99888000 |
19 April 2020 | 88414000 |
17 May 2020 | 102825000 |
14 June 2020 | 106970000 |
12 July 2020 | 102965000 |
9 August 2020 | 99568000 |
6 September 2020 | 96773000 |
4 October 2020 | 92743000 |
1 November 2020 | 95501000 |
29 November 2020 | 97082000 |
27 December 2020 | 113130000 |
24 January 2021 | 100009000 |
Any ideas welcome!
Solved! Go to Solution.
@Ed_T_Duck , With help from the week Rank and date table. Please refer blog below for more details
Last 4 weeks =
var _max1 = maxx(allselected('order'), 'order'[date])
var _max = maxx(filter(all(date), date[date] = _max1), week[Rank])
return
CALCULATE(sum('order'[Qty]), FILTER(ALL('Date'),'Date'[Week Rank]>=_max-4 && 'Date'[Week Rank]<=_max))
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-La...
https://www.youtube.com/watch?v=pnAesWxYgJ8
@Ed_T_Duck , With help from the week Rank and date table. Please refer blog below for more details
Last 4 weeks =
var _max1 = maxx(allselected('order'), 'order'[date])
var _max = maxx(filter(all(date), date[date] = _max1), week[Rank])
return
CALCULATE(sum('order'[Qty]), FILTER(ALL('Date'),'Date'[Week Rank]>=_max-4 && 'Date'[Week Rank]<=_max))
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-La...
https://www.youtube.com/watch?v=pnAesWxYgJ8
Thank amitchandak, very helpful!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
94 | |
80 | |
67 | |
59 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |