cancel
Showing results for
Did you mean:

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Helper II

## Summarising a new table in categories

I have been looking to summarise to following data points % into categories and count how many is in each category. for example

Data

 Type % A 25% B 9% C 80% D 85% E 32% F 50% G 65%

With result of something like this

 Range Count Range 0-9% 1 Range 10-19% 0 Range 20-29% 1 Range 30-39% 1 Range 40-49% 1 Range 50-59% 1 Range 60-69% 1 Range 70-79% 0 Range 80-89% 2 Range 90 - 100% 0
1 ACCEPTED SOLUTION
Super User

Hi @MdJ83 ,

To get there, I calculated a calculated category column:

```TomsCategories =
SWITCH (
TRUE(),
Table13[%] <= 0.09, "Range 0-9%",
Table13[%] <= 0.19, "Range 10-19%",
Table13[%] <= 0.29, "Range 20-29%",
Table13[%] <= 0.39, "Range 30-39%",
Table13[%] <= 0.49, "Range 40-49%",
Table13[%] <= 0.59, "Range 50-59%",
Table13[%] <= 0.69, "Range 60-69%",
Table13[%] <= 0.79, "Range 70-79%",
Table13[%] <= 0.89, "Range 80-89%"
, "Range 90-100%"
)```

Otherwise, if you are planning to do a histogram and you'd like to create some buckets, I can recommend this documentation:

Use grouping and binning in Power BI Desktop - Power BI | Microsoft Docs

/Tom

https://www.tackytech.blog

https://www.instagram.com/tackytechtom

 Also happily accepting Kudos 🙂

 Feel free to connect with me on LinkedIn!

 #proudtobeasuperuser

2 REPLIES 2
Solution Sage

Hi MDJ:

Super User

Hi @MdJ83 ,

To get there, I calculated a calculated category column:

```TomsCategories =
SWITCH (
TRUE(),
Table13[%] <= 0.09, "Range 0-9%",
Table13[%] <= 0.19, "Range 10-19%",
Table13[%] <= 0.29, "Range 20-29%",
Table13[%] <= 0.39, "Range 30-39%",
Table13[%] <= 0.49, "Range 40-49%",
Table13[%] <= 0.59, "Range 50-59%",
Table13[%] <= 0.69, "Range 60-69%",
Table13[%] <= 0.79, "Range 70-79%",
Table13[%] <= 0.89, "Range 80-89%"
, "Range 90-100%"
)```

Otherwise, if you are planning to do a histogram and you'd like to create some buckets, I can recommend this documentation:

Use grouping and binning in Power BI Desktop - Power BI | Microsoft Docs

/Tom

https://www.tackytech.blog

https://www.instagram.com/tackytechtom

 Also happily accepting Kudos 🙂

 Feel free to connect with me on LinkedIn!

 #proudtobeasuperuser

Announcements

#### Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

#### Power BI Monthly Update - July 2024

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

#### Fabric Community Update - July 2024

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

Top Solution Authors
Top Kudoed Authors