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

New Member

## Distribution of results base on intervals

```Hello, I would like to create a stacked histogram that would show the distribution of results according to a chosen interval.
What formula should I use to specify my intervals.

Let's say my data is in the Results column.

My intervals are
=0% to <64%
>=64% to <74%
>=74% to 100%

Thank you very much.```

1 ACCEPTED SOLUTION
Community Support

Hi, @Gulian

Firstly, you can create a calculated column as follows.

``````Column =
SWITCH (
TRUE (),
'Table'[result] > 0
&& 'Table'[result] < 0.64, "0-0.64",
'Table'[result] >= 0.64
&& 'Table'[result] < 0.74, "0.64-0.74",
'Table'[result] >= 0.74
&& 'Table'[result] <= 1, "0.74-1"
)``````

Create a slicer using the created column.

Here is the visual I created with my test data, for your reference.

Is this the result you expect?

Best Regards,

Yuliax

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

2 REPLIES 2
Community Support

Hi, @Gulian

Firstly, you can create a calculated column as follows.

``````Column =
SWITCH (
TRUE (),
'Table'[result] > 0
&& 'Table'[result] < 0.64, "0-0.64",
'Table'[result] >= 0.64
&& 'Table'[result] < 0.74, "0.64-0.74",
'Table'[result] >= 0.74
&& 'Table'[result] <= 1, "0.74-1"
)``````

Create a slicer using the created column.

Here is the visual I created with my test data, for your reference.

Is this the result you expect?

Best Regards,

Yuliax

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Super User

Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤

Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

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.

#### Power BI Monthly Update - August 2024

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

#### Fabric Community Update - August 2024

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

Top Solution Authors
Top Kudoed Authors