Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
My table is similar to the one below. It represents brick sales as of January 1950. Forecasted values are projected for Feb and March.
MonthYear Category Forecast/Actual Value
Jan 1950 Brick Forecast 200
Feb 1950 Brick Forecast 300
Mar 1950 Brick Forecast 420
Jan 1950 Brick Actual 250
Feb 1950 Brick Actual 0
Mar 1950 Brick Actual 0
I want to get the sum of forecasted values - but ONLY for the MonthYear values which have an 'Actual' value which is > 0.
My knowledge of DAX is currently limited, and I've tried countless ways to do this without success (including a few table transformations, which didn't help and duplicated the 'actual' values for some reason! Is there any way to do this using the table above?
Thanks.
Solved! Go to Solution.
Hello, If I were you, I'd manipulate the table in power query for loading. Pivot the Forecast/Actual column over the Values. That way you can to a simple suming calculation rather than trying to DAX your way around a table tructure thats not quite right.
Cheers,
Hi,
You may download my PBI file from here.
Hope this helps.
@samdthompson you're right, and that was my preferred approach. Unfortunately, the specific circumstances concerning my data didn't allow me to place the actual/forecast in the same rows, which led to peculiar results. I was therefore forced to use this approach. Thanks anyhow 🙂
Hi,
You may download my PBI file from here.
Hope this helps.
Hello, If I were you, I'd manipulate the table in power query for loading. Pivot the Forecast/Actual column over the Values. That way you can to a simple suming calculation rather than trying to DAX your way around a table tructure thats not quite right.
Cheers,
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
94 | |
81 | |
66 | |
58 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |