Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and a 50 percent discount on exams.
Get startedEarn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi,
How to calculate weekly sales from Cumulative Data source -
Scenario: We have 10,000 products and each week they might be some sales for them , so when we pull report for Week 1 , the Data shows actual sales for Week 1 ( Week 1 January 2017) ,
when we pull report by week 2 , it shows the Accumulated Sales Value. (Date format shows as i.e. 8 January 2017)
How in Power Bi we get weekly sales ( technically "Week2 Sales - Week 1 Sales" ) to calculate Week on Week (WoW) Growth?
-----------------------------
Customer ID Category Value Date
4 DESKTOP 144 1-Nov
4 PRINTER 109 1-Nov
1 TONER 122 1-Nov
7 LAPTOP 166 1-Nov
2 TONER 149 1-Nov
8 LAPTOP 141 1-Nov
9 TONER 172 1-Nov
8 LAPTOP 123 1-Nov
9 TONER 182 1-Nov
8 DESKTOP 158 1-Nov
3 DESKTOP 185 1-Nov
2 DESKTOP 159 1-Nov
9 DESKTOP 151 1-Nov
1 DESKTOP 196 1-Nov
5 DESKTOP 171 1-Nov
4 DESKTOP 300 8-Nov
8 DESKTOP 350 8-Nov
7 DESKTOP 400 8-Nov
8 DESKTOP 450 8-Nov
4 DESKTOP 100 8-Nov
5 DESKTOP 200 8-Nov
4 DESKTOP 240 8-Nov
5 DESKTOP 345 8-Nov
4 LAPTOP 654 8-Nov
9 LAPTOP 234 8-Nov
5 LAPTOP 432 8-Nov
Solved! Go to Solution.
I assume you need to analyze on Product Level as well. So you can create measure like below:
Weekly Growth= CALCULATE ( SUM ( Table[Sales] ), FILTER ( ALL ( Table ), Table[Category] = MAX ( Table[Category] ) && Table[Date] = MAX ( Table[Date] ) - 7 ) )
Regards,
I assume you need to analyze on Product Level as well. So you can create measure like below:
Weekly Growth= CALCULATE ( SUM ( Table[Sales] ), FILTER ( ALL ( Table ), Table[Category] = MAX ( Table[Category] ) && Table[Date] = MAX ( Table[Date] ) - 7 ) )
Regards,
Hi Simon,
Let I try the DAX and will let know the outcome
Thanks for your solution and time.
Nami
User | Count |
---|---|
94 | |
78 | |
73 | |
64 | |
60 |
User | Count |
---|---|
106 | |
97 | |
76 | |
63 | |
61 |