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

Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more

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
PBIApril_Carousel

Power BI Monthly Update - April 2025

Check out the April 2025 Power BI update to learn about new features.

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

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

Top Solution Authors