Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowGet inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.
Hello,
I am creating a report connected to a live data source that has actual budget spent and projections for future years on a monthly basis. I can't add a calculated column since it is a live data source so the best I can do is a measure.
I am trying to create a measure to return an actual amount of budget spent if the data is there and a projection if not. I'd like it to pull the number from an "Actuals" column, and if there is nothing in that "Actuals" column for that month/year, pull the value from the "Projected" column.
In excel it reads very easily like: "=IF('Actuals'="",'Projected', 'Actuals')".
But I am having issues recreating the same sort of thing in a measure in Power BI so I can add it to a matrix that shows these fields for each separate budget:
A - Projected
B - Actual
C - Actual/Projected if no actual (This measure)
D - Delta between A and C (Probably another measure?)
Any suggestions or if this is even possible? It seems like it should be possible but I've tried a bunch of different things and none have stuck.
Thanks!
Solved! Go to Solution.
So the good news is, it should be easy :
1/ Create measure for basic SUM, ie :
Tot Actual = SUM( YourTable[Actual] )
Tot Projected = SUM( YourTable[Projected] )
Actual or Projected = IF( ISBLANK( [Tot Actual] ) , [Tot Projected] , [Tot Actual] )
Delta btwn Projected and Act or Proj = [Tot Projected] - [Actual or Projected]
So the good news is, it should be easy :
1/ Create measure for basic SUM, ie :
Tot Actual = SUM( YourTable[Actual] )
Tot Projected = SUM( YourTable[Projected] )
Actual or Projected = IF( ISBLANK( [Tot Actual] ) , [Tot Projected] , [Tot Actual] )
Delta btwn Projected and Act or Proj = [Tot Projected] - [Actual or Projected]
Yes this worked, as soon as I saw your solution I immediately felt very dumb. I didn't even think of making measures that I could then create the measure I wanted from. I appreciate the help!
Don't worry, it's a quite common mistakes to forget about what I call basic measures,
but they are definitely the best first steps to make 😉
Hi,
AS far as I can understand your situation, you need to think out of Excel. In Excel you would have played with positions of cells, in DAX you'll have to play with a common information. It seems in your case the only "bridge" is the month ? or maybe not even ? Or maybe it's all in one table ?
Anyway you need to find the bridge between your data, actuals and forecast, to achieve what you need. It might as well require an iterative calculation (row by row) depending on your test ?
It's difficult to help you more without more informations but I hope this will do a little help...
Sorry, I wasn't entirely sure what other info would be needed, this is all in one (massive) table. Each of Actuals and Projected are columns in this table.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
84 | |
69 | |
66 | |
51 | |
32 |
User | Count |
---|---|
116 | |
99 | |
75 | |
65 | |
40 |