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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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

October NL Carousel

Fabric Community Update - October 2024

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