March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
HI,
I have the following scenario:
In the visual I am summarising the weekly data.
So I have week then next column I have is hours, which is basically the sum of hours for the week.
I have a measure which has certain value.
Now I want the third column having ongoing subtraction:
If the value of measure is 3200 then value of column 'new' should be as follows:
Week | Hours | New |
1 | 25 | 3175 |
2 | 48 | 3127 |
3 | 386 | 2741 |
4 | 374 | 2367 |
5 | 688 | 1679 |
6 | 352 | 1327 |
7 | 534 | 793 |
8 | 365 | 428 |
9 | 164 | 264 |
10 | 295 | -31 |
Thanks & Regards,
A
Solved! Go to Solution.
New version of the formula:
Measure = 500 - MINX(test, SUMX(FILTER(ALL(test), test[Week] <= EARLIER(test[Week]) && test[Week] > 0 && test[Report Week] = EARLIER(test[Report Week])), test[Hours]))
After seeing his data; the key is that have weeks with negatives values, so the measure was modified to:
MeasureToSubstractions = [Measure]-CALCULATE(Sum(test[Hours]);FILTER(ALLEXCEPT(test;Test[Year];test[Report Week]);test2[Week]<=max(test[Week]) && test[Week]>0))
Can you share us the pbix file; deleting all the data that you considered critical to show. I think this will be the easy way to help you in more reduced time.
After seeing his data; the key is that have weeks with negatives values, so the measure was modified to:
MeasureToSubstractions = [Measure]-CALCULATE(Sum(test[Hours]);FILTER(ALLEXCEPT(test;Test[Year];test[Report Week]);test2[Week]<=max(test[Week]) && test[Week]>0))
MeasureValues = [Measure]-CALCULATE(Sum(WeekReport[hours]);FILTER(ALLEXCEPT(WeekReport;WeekReport[Reporting Week]);WeekReport[week]<=max(WeekReport[week])))
Values = [Measure]-CALCULATE(Sum(WeekReport[hours]);FILTER(ALLEXCEPT(WeekReport;WeekReport[Reporting Week]);WeekReport[week]<=max(WeekReport[week])))
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
123 | |
85 | |
85 | |
70 | |
51 |
User | Count |
---|---|
205 | |
153 | |
97 | |
79 | |
69 |