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,
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
Solved! Go to Solution.
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?
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
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
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?
Hi @mussaenda
Thank you, these measures work.
There are really many ways to calculate something!
My Weekdata are cumulative, is there a measure that calculate all the differences between the weeks?
greetings
Marcel
Your desired output will be?
Hi @mussaenda
The output would be like this
I've added a testfile
Bron | 24 | 25 | 26 | 27 | 28 | Totaal |
369.989,44 | 41.109,93 | 45.677,71 | 50.753,01 | 35.244,40 | 542.774,49 | |
Location1 | 441.435,45 | 49.048,38 | 54.498,20 | 60.553,56 | 24.317,81 | 629.853,40 |
Location2 | 697.844,16 | 77.538,24 | 86.153,60 | 95.726,22 | 37.511,90 | 994.774,12 |
Location3 | 95.370,70 | 10.596,74 | 11.774,16 | 13.082,40 | 5.716,00 | 136.540,00 |
Location4 | 318.924,69 | 35.436,08 | 39.373,42 | 43.748,24 | 19.873,97 | 457.356,40 |
Location5 | 895.394,92 | 99.488,33 | 110.542,58 | 122.825,09 | 51.830,90 | 1.280.081,82 |
Location6 | 128.458,55 | 14.273,17 | 15.859,08 | 17.621,20 | 0,00 | 176.212,00 |
Location7 | 67.721,18 | 7.524,58 | 8.360,64 | 9.289,60 | 14.118,00 | 107.014,00 |
Location8 | 138.241,59 | 15.360,17 | 17.066,87 | 18.963,18 | 10.509,09 | 200.140,90 |
Location9 | 505.736,24 | 56.192,92 | 62.436,57 | 69.373,97 | 27.977,19 | 721.716,89 |
Location10 | 74.143,35 | 8.238,15 | 9.153,50 | 10.170,56 | 4.048,18 | 105.753,74 |
Location11 | 183.286,13 | 20.365,13 | 22.627,91 | 25.142,13 | 17.826,41 | 269.247,71 |
Location12 | 138.869,09 | 15.429,90 | 17.144,33 | 19.049,26 | 43.395,22 | 233.887,80 |
Location13 | 783.208,76 | 87.023,20 | 96.692,44 | 107.436,04 | 53.329,20 | 1.127.689,64 |
Totaal | 4.838.624,25 | 537.624,92 | 597.361,01 | 663.734,46 | 345.698,27 | 6.983.042,91 |
Hello @marsclone ,
I have achieved your desired output.
But I know this not the 100% correct solution. I hope our experts here will help you too.
Forgive me I am not good at this.
Link is here.
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 |
---|---|
109 | |
95 | |
77 | |
65 | |
53 |
User | Count |
---|---|
144 | |
105 | |
102 | |
89 | |
63 |