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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

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
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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