Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. 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])))
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
58 | |
55 | |
54 | |
38 | |
29 |
User | Count |
---|---|
78 | |
62 | |
45 | |
40 | |
40 |