Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register 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])))
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
| User | Count |
|---|---|
| 46 | |
| 43 | |
| 39 | |
| 19 | |
| 15 |
| User | Count |
|---|---|
| 68 | |
| 68 | |
| 31 | |
| 27 | |
| 24 |