Skip to main content
cancel
Showing results for 
Search instead 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

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
Europe Fabric Conference

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.

AugPowerBI_Carousel

Power BI Monthly Update - August 2024

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

August Carousel

Fabric Community Update - August 2024

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