The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
vl_sales | year | quarter | Categoty |
113mi | 2021 | 1 | Kit Kat |
114mi | 2021 | 2 | Nescau |
100mi | 2021 | 3 | Chocolate |
87mi | 2021 | 4 | Nescau |
88mi | 2022 | 1 | Beve |
115mi | 2022 | 2 | Iorgurt |
77mi | 2022 | 3 | Nesquit |
100mi | 2022 | 4 | Nescau |
90mi | 2023 | 1 | Cookies |
dim_calendar
year | quarter | quarter_list |
2021 | 1 | 202101 |
2021 | 2 | 202102 |
2021 | 3 | 202103 |
2021 | 4 | 202104 |
2022 | 1 | 202201 |
2022 | 2 | 202202 |
2022 | 3 | 202203 |
2022 | 4 | 202204 |
2023 | 1 | 202301 |
2023 | 2 | 202302 |
2023 | 3 | 202303 |
2023 | 4 | 202304 |
How can I calculate Moving Annual Sales for previous 4quarters, in way that 2023 Q1 = sum of values of the lasts 4 quarters,
and 2022 Q4 = sum of values of the lasts 4 quarters, and so on? Any Help?
@MacedoLuis , Create a new Rank column in dim calendar (calling it date in my formula)
Qtr Rank = RANKX(all('Date'),'Date'[quarter_list],,ASC,Dense)
Then you can have measure like
This Qtr = CALCULATE(sum('Table'[Qty]), FILTER(ALL('Date'),'Date'[Qtr Rank]=max('Date'[Qtr Rank])))
Last Qtr = CALCULATE(sum('Table'[Qty]), FILTER(ALL('Date'),'Date'[Qtr Rank]=max('Date'[Qtr Rank])-1))
Time Intelligence, Part of learn Power BI https://youtu.be/cN8AO3_vmlY?t=27510
Time Intelligence, DATESMTD, DATESQTD, DATESYTD, Week On Week, Week Till Date, Custom Period on Period,
Custom Period till date: https://youtu.be/aU2aKbnHuWs&t=145s
Power BI Custom Period Till Date (PTD)- https://youtu.be/rQ3Z_LtxwQM
@amitchandak I tried it, and got blanks. And also tried like this, but i got blanks. Would you have another to calculate it?
User | Count |
---|---|
65 | |
62 | |
60 | |
53 | |
28 |
User | Count |
---|---|
181 | |
82 | |
67 | |
48 | |
44 |