Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hello,
i've the follow table
| January | February | March |
Sales | 5 | 6 | 282 |
Cancelled | 3 | 6 | 19 |
SubTotal | 2 | 0 | 263 |
Total |
I'm trying to sum subtotal of the last month with the next one, already tried this measure, but it returns blank rows.
The desired output would be as follows.
January | February | March | |
Sales | 5 | 6 | 282 |
Cancelled | 3 | 6 | 19 |
SubTotal | 2 | 0 | 263 |
Total | 2 | 2 (this month Subtotal + last month Total) | 265 (this month Subtotal + last month Total) |
Any ideas?
Regards.
Solved! Go to Solution.
See if this works. I've create a Date Table in the model
With this measure:
Previous SubTotal + Total =
CALCULATE (
[Subtotal],
FILTER (
ALL ( 'Date Table' ),
'Date Table'[Date] <= MAX ( 'Date Table'[Date] )
)
)
I've attached the sample PBIX file
Proud to be a Super User!
Paul on Linkedin.
Can you please post sample data (you can recreate the table structure + data in Excel) replicating the structure of your data?
Proud to be a Super User!
Paul on Linkedin.
See if this works. I've create a Date Table in the model
With this measure:
Previous SubTotal + Total =
CALCULATE (
[Subtotal],
FILTER (
ALL ( 'Date Table' ),
'Date Table'[Date] <= MAX ( 'Date Table'[Date] )
)
)
I've attached the sample PBIX file
Proud to be a Super User!
Paul on Linkedin.
Nice !! =D
Thank you ! !
What is the actual structure of the data? Does the data include dates? Do you have a Date Table?
Proud to be a Super User!
Paul on Linkedin.
I don't have a date table.
I do have a date column.
I distinct count IDs to get Sales, and for the cancelled ones i distinct count filtering where status is cancelled.
Subtotal is just the substraction of both results.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
143 | |
85 | |
66 | |
51 | |
45 |
User | Count |
---|---|
217 | |
89 | |
82 | |
66 | |
57 |