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
h1629
Frequent Visitor

How to remove Zeros in a measure

I have crated measure which is working good , but I am unable to filter the row where the measure value is zero. Through filter panel it should not be filtered. I need a DAX query to hide the last row with ID =C where measure value is 0.

Measure =
SWITCH(TRUE(),
SELECTEDVALUE('Table'[ID])="C",0,
SELECTEDVALUE('Table'[ID])=BLANK(), CALCULATE(SUMX('Table','Table'[Value]),'Table'[ID2]=BLANK(),ALLEXCEPT('Table','Table'[ID2])),
SUMX('Table','Table'[Value]))

h1629_2-1709706569094.png

 

h1629_1-1709706208416.png

 

1 ACCEPTED SOLUTION
talespin
Solution Sage
Solution Sage

hi @h1629 

 

Use this for Sum value

IF( SELECTEDVALUE('Table'[ID]) = "C", BLANK(), SUM('Table'[Value]) )
 
Use this for other measure
Measure =
SWITCH(TRUE(),
SELECTEDVALUE('Table'[ID])="C",BLANK(),
SELECTEDVALUE('Table'[ID])=BLANK(), CALCULATE(SUMX('Table','Table'[Value]), ISBLANK('Table'[ID]),ALLEXCEPT('Table','Table'[ID])),
SUMX('Table','Table'[Value]))
 
talespin_0-1709707414641.png

 

View solution in original post

2 REPLIES 2
talespin
Solution Sage
Solution Sage

hi @h1629 

 

Use this for Sum value

IF( SELECTEDVALUE('Table'[ID]) = "C", BLANK(), SUM('Table'[Value]) )
 
Use this for other measure
Measure =
SWITCH(TRUE(),
SELECTEDVALUE('Table'[ID])="C",BLANK(),
SELECTEDVALUE('Table'[ID])=BLANK(), CALCULATE(SUMX('Table','Table'[Value]), ISBLANK('Table'[ID]),ALLEXCEPT('Table','Table'[ID])),
SUMX('Table','Table'[Value]))
 
talespin_0-1709707414641.png

 

h1629
Frequent Visitor

It is a Data model , so we can canot create any flag and put it in the Filter panel to filter the rows. 

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

Top Solution Authors
Users online (675)