Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
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])))
Check out the September 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.