Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Hi Guys,
Seeking help solving a DAX problem.
I am trying to create a DAX measure which would set all values before current date to 0 otherwise show the expected value.
Solved! Go to Solution.
Hi @Anonymous ,
Please update the formula of measure [CPU consumed up until forecast] and [CPU forecast_WIP] as below and check if you can get the expected result...
CPU consumed up until forecast =
VAR _seldate =
SELECTEDVALUE ( Historical_allocation_total[DATE] )
RETURN
CALCULATE (
SUM ( 'Historical_allocation_total'[CPU consumed (GHz)] ),
FILTER (
ALLSELECTED ( Historical_allocation_total ),
Historical_allocation_total[DATE] >= TODAY ()
&& Historical_allocation_total[DATE] <= _seldate
)
)
CPU forecast_WIP =
IF (
SELECTEDVALUE ( Historical_allocation_total[DATE] ) < TODAY (),
0,
Historical_allocation_total[CPU_forecast] + Historical_allocation_total[CPU consumed up until forecast]
)
If the above one is not working, please provide some sample data in the table 'Historical_allocation_total' with Text format and the calculation logic [CPU forecast (GHz)], [CPU consume(GHz)] and [CPU consumed up until forecast] with the special examples. It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.
How to upload PBI in Community
Best Regards
Hi @Anonymous ,
Please update the formula of measure [CPU consumed up until forecast] and [CPU forecast_WIP] as below and check if you can get the expected result...
CPU consumed up until forecast =
VAR _seldate =
SELECTEDVALUE ( Historical_allocation_total[DATE] )
RETURN
CALCULATE (
SUM ( 'Historical_allocation_total'[CPU consumed (GHz)] ),
FILTER (
ALLSELECTED ( Historical_allocation_total ),
Historical_allocation_total[DATE] >= TODAY ()
&& Historical_allocation_total[DATE] <= _seldate
)
)
CPU forecast_WIP =
IF (
SELECTEDVALUE ( Historical_allocation_total[DATE] ) < TODAY (),
0,
Historical_allocation_total[CPU_forecast] + Historical_allocation_total[CPU consumed up until forecast]
)
If the above one is not working, please provide some sample data in the table 'Historical_allocation_total' with Text format and the calculation logic [CPU forecast (GHz)], [CPU consume(GHz)] and [CPU consumed up until forecast] with the special examples. It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.
How to upload PBI in Community
Best Regards
This is working exactly as I wanted! Thank you very much for such a swift help. Appreciate it 🙂
@Anonymous , Simply Try like
CALCULATE(MAX(Historical_allocation_total[DATE]),Historical_allocation_total[DATE] = TODAY()) +0
or
SUM('Historical_allocation_total'[CPU consumed (GHz)]) +0
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.
User | Count |
---|---|
12 | |
11 | |
9 | |
8 | |
8 |