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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

Reply
Gulian
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
v-xuxinyi-msft
Community Support
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"
)

 

vxuxinyimsft_0-1701760551464.png

 

Create a slicer using the created column.

vxuxinyimsft_4-1701761831351.png

 

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

vxuxinyimsft_3-1701761667484.png

 

 

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.

 

View solution in original post

2 REPLIES 2
v-xuxinyi-msft
Community Support
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"
)

 

vxuxinyimsft_0-1701760551464.png

 

Create a slicer using the created column.

vxuxinyimsft_4-1701761831351.png

 

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

vxuxinyimsft_3-1701761667484.png

 

 

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.

 

parry2k
Super User
Super User

@Gulian Read this post to get your answer quickly.

https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490



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.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

March2025 Carousel

Fabric Community Update - March 2025

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

Top Kudoed Authors