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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
AmberJane
Helper III
Helper III

If value is greater than X return X if value is less than X return X

Good Morning, 

 

I have a column that comes over with location numbers. I need to find a way to transform this column to show if the value is greater than 1000 return "1000+ Stores" if value is less than 1000 return "1-999 Stores" 

 

Thank you, 

1 ACCEPTED SOLUTION
bhanu_gautam
Super User
Super User

@AmberJane , You can achieve it using Switch function

 

Store Classification =
SWITCH (
TRUE (),
'YourTableName'[Location Number] > 1000, "1000+ Stores",
'YourTableName'[Location Number] <= 1000, "1-999 Stores"
)

 

Please accept as solution and give kudos if it helps




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






View solution in original post

3 REPLIES 3
bhanu_gautam
Super User
Super User

@AmberJane , You can achieve it using Switch function

 

Store Classification =
SWITCH (
TRUE (),
'YourTableName'[Location Number] > 1000, "1000+ Stores",
'YourTableName'[Location Number] <= 1000, "1-999 Stores"
)

 

Please accept as solution and give kudos if it helps




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






Very cool that did work but I missed something. If stores are 0 I need a third option of 0 locations impacted. How would I add that?

 

So need: 

1000+ Stores 

1-999 Stores 

0 Stores 

This worked.. although I am not sure its the best way to do it haha.
 
Stores Impacted = SWITCH(TRUE(),'YourTableName'[Location Number] >= 1000, "1000+ Stores", 'YourTableName'[Location Number]  > 1, "1-999 Stores",'YourTableName'[Location Number]  = 0, "0 Stores")

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.