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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
QuasemS
Frequent Visitor

Change values in column based on range

Hi,

 

Is there a way to select a specific column, and then change some of it's values to something else, based on it's range. For example, I'm trying to change a percentage column, where anything > 100% should just be converted to 100%.

 

Is there a way to set the conditions for value replacement in the query editor?

2 ACCEPTED SOLUTIONS

Sorry,

Customer ColumnA = IF([ColumnA]>100,"100%",[ColumnA])

Try that DAX formula.

 

Example screenshot of what I have on mines.

 

DAX.PNG

Kris

View solution in original post

https://msdn.microsoft.com/en-us/library/ee634824.aspx

 

Link above is for the IF Function. See if that'll help you.

Kris

View solution in original post

4 REPLIES 4
a_mixed_life
Resolver I
Resolver I

You could always create a new column with the logic you're trying to implement.

 

Column A = 110%

 

New Column A = IF ColumnA is > 100% Then 100%.

 

That way you still have the original data of your column in case you need it.

Kris

I'm getting a syntax error when I try to do that in the Query Editor. The "greater than" sign is not valid.

https://msdn.microsoft.com/en-us/library/ee634824.aspx

 

Link above is for the IF Function. See if that'll help you.

Kris

Sorry,

Customer ColumnA = IF([ColumnA]>100,"100%",[ColumnA])

Try that DAX formula.

 

Example screenshot of what I have on mines.

 

DAX.PNG

Kris

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors