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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

AugPowerBI_Carousel

Power BI Monthly Update - August 2024

Check out the August 2024 Power BI update to learn about new features.

August Carousel

Fabric Community Update - August 2024

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