cancel
Showing results for
Did you mean:

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

-nan(ind) in the table, how to leave them at 0?

Dear, how are you?

I have a table that works from two filters whose DAX is:

N = SWITCH(TRUE(),
VALUES('KPI'[Metric])="FOOD",
SWITCH(TRUE(),
VALUES('Metric'[Measure])="Units", FORMAT([MAT N Units],"#,##0"),
VALUES('Metric'[Measure])="USD",FORMAT([Valor USD MAT N],"#,##0"),
VALUES('Metric'[Measure])="Price",FORMAT([Valor USD MAT N]/[MAT N Units],"#,##0")
),
VALUES('KPI'[Metric])="Growth",
SWITCH(TRUE(),
VALUES('Metric'[Measure])="Units", FORMAT([MAT N Units]/[N-1 MAT Units]-1,"0.00%"),
VALUES('Metric'[Measure])="USD",FORMAT([Valor USD MAT N]/[Valor USD MAT N-1]-1,"0.00%"),
VALUES('Metric'[Measure])="Price",FORMAT([Price USD N]/[Price USD N-1]-1,"0.00%")))
DAX of some of the calculations that are basically repeated in the other periods N, N-2 and N-3:
MAT N-1 units = CALCULATE(
[Units],
DATESINPERIOD(TOTAL[Date], .MAX(TOTAL[Date]), -24, MONTH)) -CALCULATE(
[Units],
DATESINPERIOD(TOTAL[Date], .MAX(TOTAL[Date]), -12, MONTH))
y
Valor USD MAT N-1 = CALCULATE(
[Valor USD],
DATESINPERIOD(TOTAL[Date], .MAX(TOTAL[Date]), -24, MONTH)) -CALCULATE(
[Valor USD],
DATESINPERIOD(TOTAL[Date], .MAX(TOTAL[Date]), -12, MONTH))
However, when it comes to displaying the values, I get the errors indicated in the subject of the topic.

How they could be "deleted" or changed to values 0.

Thank you very much in advance.

Best regards!

4 REPLIES 4

Yes, because the summation symbol appears in the UNITS column

This means that all values have no numerical inconsistency, and can be summarized through mathematical operations.

Best regards!

Super User

can you guarantee that all values in TOTAL[UNITS] are summarizable?  All numbers?

Dear

The definition is:

Units = SUM(TOTAL[UNITS])
Best regards!
Super User

what is the definition of [Units] ?