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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
oakfootballclub
Helper IV
Helper IV

how to remove the duplicate rows when add + 0 in dax to replace the blank to 0

Hi experts, I created a table visual and there may be some blank values so I created the measure like this:

// VAR cal=
DIVIDE(
CALCULATE(SUM(fact_usd[ner_week]))
,
CALCULATE(SUM(fact_usd[ser_week]))) +0
// RETURN
// IF(ISBLANK(cal),0,cal)
there is a +0 or I use ISBLANK so in the table visual it seems all the rows becomes shown rather only one required row, do you know how to solve it? Thank you.
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @oakfootballclub ,

 

I think your issue should be casued by your data model.

According to your code, in cal all blank value will return 0 so there is no blank value basd on this logic.

// VAR cal=
DIVIDE(
CALCULATE(SUM(fact_usd[ner_week]))
,
CALCULATE(SUM(fact_usd[ser_week]))) +0
// RETURN
// IF(ISBLANK(cal),0,cal)

If you need to use ISBLANK() function, I think you need to remove +0 from cal as rajendraongole1  mentioned.

If his code still couldn't achieve your goal, you can try to add more logic in IF().

For example:

Measure 2 = 
VAR cal =
DIVIDE(
CALCULATE(SUM(fact_usd[ner_week])),
CALCULATE(SUM(fact_usd[ser_week]))
)
RETURN
IF(ISBLANK(cal) && MAX(DimDate[Date]) <=EOMONTH(TODAY(),0), 0, cal)

Here I let my code to show data until this month. I hope it could help you solve your issue.

vrzhoumsft_0-1722848500684.png

If this reply still couldn't help you solve your issue, please share a sample file with us.

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

 

 

View solution in original post

4 REPLIES 4
rajendraongole1
Super User
Super User

Hi @oakfootballclub -Create the below measure

To display the table visual only the relevant rows without unnecessary duplication.

Measure =
VAR cal =
DIVIDE(
CALCULATE(SUM(fact_usd[ner_week])),
CALCULATE(SUM(fact_usd[ser_week]))
)
RETURN
IF(ISBLANK(cal), 0, cal)

 

Hope it helps





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Thanks, actually I have tried by this method and it does not successfully get the result I need

Anonymous
Not applicable

Hi @oakfootballclub ,

 

I think your issue should be casued by your data model.

According to your code, in cal all blank value will return 0 so there is no blank value basd on this logic.

// VAR cal=
DIVIDE(
CALCULATE(SUM(fact_usd[ner_week]))
,
CALCULATE(SUM(fact_usd[ser_week]))) +0
// RETURN
// IF(ISBLANK(cal),0,cal)

If you need to use ISBLANK() function, I think you need to remove +0 from cal as rajendraongole1  mentioned.

If his code still couldn't achieve your goal, you can try to add more logic in IF().

For example:

Measure 2 = 
VAR cal =
DIVIDE(
CALCULATE(SUM(fact_usd[ner_week])),
CALCULATE(SUM(fact_usd[ser_week]))
)
RETURN
IF(ISBLANK(cal) && MAX(DimDate[Date]) <=EOMONTH(TODAY(),0), 0, cal)

Here I let my code to show data until this month. I hope it could help you solve your issue.

vrzhoumsft_0-1722848500684.png

If this reply still couldn't help you solve your issue, please share a sample file with us.

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

 

 

Hi @oakfootballclub - Ok, share with some sample data with expectations , will try from our end.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors