Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
I am trying to create a bar graph that along the x axis we have the categories: 5 days +. 6 days +, 7 days +, 8 days +, 9 days +, 10+ days.
Along the Y axis we have Count of repairs.
The purpose is to show how many repairs at each stage there are. This should be cumulative so the first category should always be the tallest bar. For example (apologies for the crude drawing):
all repairs in 6+ should also be counted in 5+, because they have also been in repair more than 5 days.
Currently I have:
[Count of Repairs]
'table'[Days in repair] (this is the number of days the job has been in repair.
How do i create a measure/columns to give me a group that sorts my repairs into categories (5days+,6days+ etc) and how do I write a measure to group my repairs cumulatively?
Thanks so much for any help.
Solved! Go to Solution.
Hi @Anonymous ,
Based on your description, I have created a simple sample:
Please try:
First create a new table for x-axis:
X-Axis = {"5+","6+","7+","8+"}
Then apply the measure to the column visual:
Count of Repairs =
var _a = VALUE(LEFT(MAX('X-Axis'[Value]),LEN(MAX('X-Axis'[Value])-1)))
return CALCULATE(DISTINCTCOUNT('Table'[ID]),FILTER('Table',[Days in repair]>_a))
Final output:
Best Regards,
Jianbo Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi,
I am not sure how much i can help but i would like to try. Share the download link of the PBI file. Only keep tables/columns there which are necessary to solve this question. Remove all irrelevant tables/columns.
Hi @Anonymous ,
Based on your description, I have created a simple sample:
Please try:
First create a new table for x-axis:
X-Axis = {"5+","6+","7+","8+"}
Then apply the measure to the column visual:
Count of Repairs =
var _a = VALUE(LEFT(MAX('X-Axis'[Value]),LEN(MAX('X-Axis'[Value])-1)))
return CALCULATE(DISTINCTCOUNT('Table'[ID]),FILTER('Table',[Days in repair]>_a))
Final output:
Best Regards,
Jianbo Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Amazing, works like a charm, thank you so much!
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
94 | |
86 | |
81 | |
70 | |
49 |
User | Count |
---|---|
143 | |
124 | |
107 | |
60 | |
55 |