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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Akshay123
Helper I
Helper I

How to replace 0 values to measure

Hi Experts

 

I have data like below and it's direct fields from the source, I have created measures for Jan to Dec months.

If flaw_cnt is blank or 0 value need to replace it with my particular month measure or if it is <> 0 or Blank it has to load the actual value.

 

Akshay123_0-1713524152404.png

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Akshay123 ,

 

According to your description, here are my steps you can follow as a solution.

(1) This is my test data. 

vtangjiemsft_0-1713768094941.png

(2) We can create a measure. 

New Measure = IF(SUM('Table'[flaw_cnt])= BLANK() ||SUM('Table'[flaw_cnt])=0,[Yourmeasure],SUM('Table'[flaw_cnt]))

(3) Then the result is as follows.

vtangjiemsft_1-1713768167739.png

 

If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. 

 

Best Regards,

Neeko Tang

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

5 REPLIES 5
Anonymous
Not applicable

Hi @Akshay123 ,

 

According to your description, here are my steps you can follow as a solution.

(1) This is my test data. 

vtangjiemsft_0-1713768094941.png

(2) We can create a measure. 

New Measure = IF(SUM('Table'[flaw_cnt])= BLANK() ||SUM('Table'[flaw_cnt])=0,[Yourmeasure],SUM('Table'[flaw_cnt]))

(3) Then the result is as follows.

vtangjiemsft_1-1713768167739.png

 

If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. 

 

Best Regards,

Neeko Tang

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

Kedar_Pande
Super User
Super User

FLAW_CNT_REPLACE= if(flaw_cnt=blank() || flaw_cnt=0, [Your measeure for months],flaw_cnt)

Let me know if this helps

Hi @Kedar_Pande 
Thanks for your response, it will not work.
My appoach I am looking, I need to validate all the months and return the value

for ex :
var a = if(month = 1, sum(flaw_cnt) 
var b = if(month = 2, sum(flaw_cnt)

.

.

.

var c =  if(month = 12, sum(flaw_cnt) 

 

Return

if (a = 0, My measure, a)
But i am unable to return all months value

 

Hi @Akshay123 ,
How month and flaw_cnt is related?
Can you share the pbix file?


Hi @Kedar_Pande 

 

Can't attach any files here, I have some limitations.
It's just like sales amout, which month how much of sales happend.

Till April have data, rest of the months are preductive count.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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