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.
I'm trying to get a running total of my Variance column. Variance is a measure of (Budget - Spend). Here is the Running Total measure I've created and the results. The weird thing is it starts the running total in the first month where there's no spend amount (January), otherwise it's just giving me the total of the Variance column until then.
Solved! Go to Solution.
I've tried replicating, and mine seems to work. Here is how mine is built, take a look and compare with yours for any "ah-ha's."
Sample Data:
Model:
Measures:
Budget = CALCULATE( SUM( 'P&L Sample'[LineAmount] ) , 'P&L Sample'[Status] = "Budget" )
Spend = CALCULATE( SUM( 'P&L Sample'[LineAmount] ) , 'P&L Sample'[Status] = "Spend" )
Variance_ = [Budget] - [Spend]
VAR Running Tot =
VAR _maxdate = MAX( 'Date'[Date] )
VAR _logic =
SUMX(
FILTER(
ALL('Date') , 'Date'[Date] <= _maxdate ) ,
[Variance_]
)
RETURN
_logic
Output:
Think you want this:
Cumulative =
VAR _maxdate = MAX( 'Date'[Date] )
VAR _logic =
SUMX(
FILTER(
ALL('Date') , 'Date'[Date] <= _maxdate ) ,
[Variance]
)
RETURN
_logic
Here's what I entered:
I have a feeling it's a problem with your date periods since you are using custom fiscal periods.
Can you please share a sample of your data and a screenshot of your model?
Here is a sample of data from the main table:
Here is the portion of the model:
Both the Budget and Spend Amounts are measures constructed as such:
And the FY24 Month column in your visual is coming from the Calendar (2) table, yes?
Yes.
I've tried replicating, and mine seems to work. Here is how mine is built, take a look and compare with yours for any "ah-ha's."
Sample Data:
Model:
Measures:
Budget = CALCULATE( SUM( 'P&L Sample'[LineAmount] ) , 'P&L Sample'[Status] = "Budget" )
Spend = CALCULATE( SUM( 'P&L Sample'[LineAmount] ) , 'P&L Sample'[Status] = "Spend" )
Variance_ = [Budget] - [Spend]
VAR Running Tot =
VAR _maxdate = MAX( 'Date'[Date] )
VAR _logic =
SUMX(
FILTER(
ALL('Date') , 'Date'[Date] <= _maxdate ) ,
[Variance_]
)
RETURN
_logic
Output:
Still getting the same results. I'm perplexed. Closing thread for now. I'll take a look at a few things.
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 |
---|---|
145 | |
85 | |
66 | |
52 | |
48 |
User | Count |
---|---|
215 | |
90 | |
83 | |
67 | |
59 |