The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
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.
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
80 | |
71 | |
51 | |
50 |
User | Count |
---|---|
123 | |
119 | |
76 | |
64 | |
60 |