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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
ramshoney1225
Helper V
Helper V

Regarding Conversion of Number to a Text in measure column

Hi I have a requirment, i have a table with 

Name , Country, count


Count is a numeric type which holds count of order per name..

In my Count column there is ( -9999) or ( 9999 ) values which can consider one case -9999 or 9999 I'm considering 9999

Now i need to create a measure like when ever i see 9999 it should show as "NA" in the report and other it shows it values.

 

 

Please help

 

Thanks,

 

1 ACCEPTED SOLUTION

Hi @ramshoney1225 

could you please use below code as it is, in your measure. 

 

M11 =
IF ( MAX ( 'Sheet1'[measure] ) = -9999, "NA", MAX ( 'Sheet1'[measure] ) )

 

Thanks,

Samarth

Best Regards,
Samarth

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin

View solution in original post

5 REPLIES 5
ramshoney1225
Helper V
Helper V

I tried with Measure and Calculated column, both are throwing error.

Samarth_18
Community Champion
Community Champion

Hi @ramshoney1225 

 

You can create a measure with below code:-

Measure = IF(MAX('Table'[count]) = 9999, "NA",MAX('Table'[count]))

Output:-

Samarth_18_0-1628158862487.png

My table data:-

Samarth_18_1-1628158881282.png

Thanks,

Samarth

 

 

Best Regards,
Samarth

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin

Hi @Samarth_18 

 

Thanks for quick help. but I'm getting the below issue when using sample data

 

ramshoney1225_0-1628159785812.png

 

Hi @ramshoney1225 

could you please use below code as it is, in your measure. 

 

M11 =
IF ( MAX ( 'Sheet1'[measure] ) = -9999, "NA", MAX ( 'Sheet1'[measure] ) )

 

Thanks,

Samarth

Best Regards,
Samarth

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin

Hi @Samarth_18 

 

Thanks for the quick help. Issue resloved the above logic.

In hurry i missed the ")" brace in the Max (   = )  🤣

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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