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

Making either a Calculated Column/Measure to assign data values to a category label.

BradyLinnebur_1-1709242601227.png

Hello,

 

I am currently trying to get the above screenshot from excel into power bi. 

 

Currently I have this 

Usage Category = SWITCH(
    TRUE(),
    'Restaurants'[Usage] >= 1, "Full Usage",
    'Restaurants'[Usage] >= 0.7, "High Usage",
    'Restaurants'[Usage] >= 0.5, "Medium Usage",
    'Restaurants'[Usage] >= 0.3, "Low Usage",
    "Minimal Usage"
)

Problem I am running into is no matter what the 'Restaurants' [Usage] is, it either assigns it to Full Usage or Minimal Usage.

BradyLinnebur_3-1709242879639.png

 

I have values in between however and it doesn't correctly tie them to the correct value.

 

Any ideas or suggestions?

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Brady-Linnebur ,

 

How is the '# of stores' calculated in your table visual?

 

I have created sample data:

vhuijieymsft_0-1709258907769.png

 

And created a calculated column:

 

Usage Category = SWITCH(
    TRUE(),
    'Restaurants'[Usage] >= 1, "Full Usage",
    'Restaurants'[Usage] >= 0.7, "High Usage",
    'Restaurants'[Usage] >= 0.5, "Medium Usage",
    'Restaurants'[Usage] >= 0.3, "Low Usage",
    "Minimal Usage"
)

 

 

It works fine.

vhuijieymsft_0-1709259023380.png

 

There are two points to note during the operation:

 

  1. Make sure your columns are in numeric format.

vhuijieymsft_2-1709258907771.png

 

  1. Remember to select "Don't summarize" when dragging it to the table visual for display, as your values will appear to be aggregated.

vhuijieymsft_1-1709259080447.png

 

I would be grateful if you could provide me with your sample data in Power BI.

 

If you have any further questions please feel free to contact me.

 

pbix file is attached.

 

Best Regards,
Yang
Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

View solution in original post

5 REPLIES 5
Ashish_Mathur
Super User
Super User

Hi,

I cannot understand your question.  Share raw data in a format that can be pasted in an MS Excel file, explain the question and show the expected result.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

I am unsure on what you are wanting. The 702, 497, etc. are made from a count function that goes into the [current inner open shelf usage] and sees what number it is tied to. Some numbers are over 1 like 2.7 or 8.3. So those would be in the 1 category. Anything below that would then be categorized by what their [current inner open shelf usage] is.

Anonymous
Not applicable

Hi @Brady-Linnebur ,

 

How is the '# of stores' calculated in your table visual?

 

I have created sample data:

vhuijieymsft_0-1709258907769.png

 

And created a calculated column:

 

Usage Category = SWITCH(
    TRUE(),
    'Restaurants'[Usage] >= 1, "Full Usage",
    'Restaurants'[Usage] >= 0.7, "High Usage",
    'Restaurants'[Usage] >= 0.5, "Medium Usage",
    'Restaurants'[Usage] >= 0.3, "Low Usage",
    "Minimal Usage"
)

 

 

It works fine.

vhuijieymsft_0-1709259023380.png

 

There are two points to note during the operation:

 

  1. Make sure your columns are in numeric format.

vhuijieymsft_2-1709258907771.png

 

  1. Remember to select "Don't summarize" when dragging it to the table visual for display, as your values will appear to be aggregated.

vhuijieymsft_1-1709259080447.png

 

I would be grateful if you could provide me with your sample data in Power BI.

 

If you have any further questions please feel free to contact me.

 

pbix file is attached.

 

Best Regards,
Yang
Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

danextian
Super User
Super User

Hi @Brady-Linnebur ,

What is the result of this calc column in the data/table view?





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

Here is the output. The only thing changed since yesterday is that instead of "Full Usage", "Medium Usage" etc. I just use numbers like 1, 0.8, 0.6 etc. 

BradyLinnebur_1-1709312375598.png

BradyLinnebur_2-1709312430257.png

 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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