Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowGet inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.
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.
Solved! Go to Solution.
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.
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.
@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.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
85 | |
73 | |
65 | |
51 | |
30 |
User | Count |
---|---|
115 | |
103 | |
71 | |
65 | |
39 |