Forum Discussion
marsclone
7 years agoHelper IV
Week to Date Measure
Hi,
I'm struggling to get Week Measures to work. YTD Measures are working.
What am i doing wrong?
Thank you for your help!
Regards Marcel
Hi,
TotalAmount WTD = CALCULATE ( [TotalAmount], 'Date'[Weeknumber] = WEEKNUM(TODAY()))Total Amount WTD LW = CALCULATE([TotalAmount], 'Date'[Weeknumber] = WEEKNUM(TODAY())-1)
Difference = [TotalAmount WTD] - [Total Amount WTD LW]
Have you tried these code?
7 Replies
- v-xicaiCommunity Support
Hi marsclone ,
I am not sure what desired result would you want, could you please clarify and share the desired output screenshots for further analysis? Do mask sensitive data before uploading.
Please read this post to get your answer quickly: How to Get Your Question Answered Quickly.
Best Regards,
Amy
- marscloneHelper IV
Hi v-xicai
Thank you for your help!
In my file there are only 2 weeks of data, but what i would like to achieve, is to calculate "Week to Date" - "Last Week" and the Difference between those.
It would look like
Bron Week to Date Last Week Difference 542.774,49 507.530,09 35.244,40 Location1 629.853,40 605.535,59 24.317,81 Location2 994.774,12 957.262,22 37.511,90 Location3 136.540,00 130.824,00 5.716,00 Location4 457.356,40 437.482,43 19.873,97 Location5 1.280.081,82 1.228.250,92 51.830,90 Location6 176.212,00 176.212,00 0,00 Location7 107.014,00 92.896,00 14.118,00 Location8 200.140,90 189.631,81 10.509,09 Location9 721.716,89 693.739,70 27.977,19 Location10 105.753,74 101.705,56 4.048,18 Location11 269.247,71 251.421,30 17.826,41 Location12 233.887,80 190.492,58 43.395,22 Location13 1.127.689,64 1.074.360,44 53.329,20 Totaal 6.983.042,91 6.637.344,64 345.698,27 Thank you!
Regards Marcel
- mussaendaCommunity Champion
Hi,
TotalAmount WTD = CALCULATE ( [TotalAmount], 'Date'[Weeknumber] = WEEKNUM(TODAY()))Total Amount WTD LW = CALCULATE([TotalAmount], 'Date'[Weeknumber] = WEEKNUM(TODAY())-1)
Difference = [TotalAmount WTD] - [Total Amount WTD LW]
Have you tried these code?