The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
Hi All,
I have a column called "Value" in my PBI file, which is of Decimal Number type by default also containing "NaN". "NaN" came directly from the source file. So it causes my DAX function to display NaN. Is there any way to avoid it? ( Without replacing NaN to 0).
my DAX is
Solved! Go to Solution.
Hi @jinsbi
I think you need to remove NaN at row level to avoid erros in your calculation. Try:
Energy export =
CALCULATE (
SUMX ( Turbine_Data, IF ( Turbine_Data[Value] > 0, Turbine_Data[Value] ) ),
Turbine_Data[Signal] = "Energy Export (kWh)"
)
Please let me know if solved your problem. If so, kindly mark my reply as accepted solution. Thank you!
Hi @jinsbi
I think you need to remove NaN at row level to avoid erros in your calculation. Try:
Energy export =
CALCULATE (
SUMX ( Turbine_Data, IF ( Turbine_Data[Value] > 0, Turbine_Data[Value] ) ),
Turbine_Data[Signal] = "Energy Export (kWh)"
)
Please let me know if solved your problem. If so, kindly mark my reply as accepted solution. Thank you!
Thanks for the response.It helps to replace NaN with 0. But it makes total calculated as 0 instead of 3400653.00
User | Count |
---|---|
14 | |
12 | |
8 | |
6 | |
5 |
User | Count |
---|---|
29 | |
18 | |
13 | |
8 | |
5 |