Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hey everyone, I have a question. I have a table with multiple columns (the Health column is a calculated column, which is calculated by other columns in this table, in case that is of importance) which looks something like this (in reality there are more rows and columns):
ID | Date | Health in % |
TF 1 | 1.1.2020 | 99 |
TF 3 | 4.1.2020 | 68 |
TF 4 | 19.1.2020 | 91 |
TF 4 | 5.2.2020 | 76 |
TF 7 | 10.2.2020 | 92 |
TF 8 | 12.2.2020 | 78 |
I now want to count the number of rows, i.e. products, who's health lies in a specific range of percentage, so I would like to count the number of entries who's health lie in the range 100%-95%, then how many lie in 95%-90% and so on. Then I would like to visualize these results in form of a bar chart (my idea so far) where the x-axis are those percentage ranges and the y-axis is the amount of entries.
Now counting isn't the problem. So far I have been adding calculated columns where each column is one of those ranges and then I have filtered the rows which lie in them. From then on you can count the rows by using the COUNTROWS operator and I could work from there. But this seems like far too much work for such a 'simple' task. Is there a better way to do this that I am not aware of?
Any help would be appreciated. THANKS!!
Solved! Go to Solution.
@Anonymous
you can try use SWITCH()
Column = SWITCH(TRUE(),Sheet41[Health in %]>95,"95-100",Sheet41[Health in %]>90,"90-95")
Proud to be a Super User!
@Anonymous , refer if these can help
https://www.daxpatterns.com/dynamic-segmentation/
https://www.daxpatterns.com/static-segmentation/
https://www.poweredsolutions.co/2020/01/11/dax-vs-power-query-static-segmentation-in-power-bi-dax-power-query/
https://radacad.com/grouping-and-binning-step-towards-better-data-visualization
@Anonymous
you can try use SWITCH()
Column = SWITCH(TRUE(),Sheet41[Health in %]>95,"95-100",Sheet41[Health in %]>90,"90-95")
Proud to be a Super User!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
99 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
102 | |
87 | |
64 |