Forum Discussion
Create weekly units from daily units
Hi,
I am currently trying to create a measure to obtain the weekly units based on the daily units.
In this Data the daily unit is the QTY.
I have also the week in this database, so I would like to be able to calculate the weekly units based on the week and the store I select. Any suggestion?
Thanks in advance for your help
- Anonymous5 years ago
Hi alexcatala ,
You could use ALLEXCEPT() to calculate the sum of each group:
Measure = CALCULATE(SUM('Table'[Qty]),ALLEXCEPT('Table','Table'[Store],'Table'[Week]))
Please take a look at the difference outputs:Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
4 Replies
- amitchandak
Super User
alexcatala , You use sum(Table[Qty]) with week no in visual ?
if if you want to compare
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- alexcatala
Helper IV
As you can see I have daily units (QTY) and the last column gives the week num (Week)
I would like to be able to sum all the weekly unit and could filter by store and week.
thanks for your help
- amitchandak
Super User
alexcatala , In a table/matrix or any visual. Take un summarized week column and sum(table[Qty]) , you will week wise data.
- AnonymousNot applicable
Hi alexcatala ,
You could use ALLEXCEPT() to calculate the sum of each group:
Measure = CALCULATE(SUM('Table'[Qty]),ALLEXCEPT('Table','Table'[Store],'Table'[Week]))
Please take a look at the difference outputs:Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.