Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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

Reply
Syndicate_Admin
Administrator
Administrator

-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.
MatiasBI1986_0-1689912828292.png

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

Thank you very much in advance.

Best regards!

4 REPLIES 4
Syndicate_Admin
Administrator
Administrator

Yes, because the summation symbol appears in the UNITS column

MatiasBI1986_0-1690164151607.png

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

Best regards!

lbendlin
Super User
Super User

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

Syndicate_Admin
Administrator
Administrator

Dear

The definition is:

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

what is the definition of [Units] ?

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.