Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Hello,
I am trying to sort a clustered column chart by the value of the y-axis, but I want it to be for a particular value within the y-axis. I have already tried created a separate table with the two different categories I am looking at and sorting the column order by an identifier that will put the value that I want first.
The data fields I am using are:
The resultant chart is a clustered bar chart with two different bars for each value on the x-axis. I want to sort the x-axis from highest to lowest using only one of these values (a particular type of "Completion type"); basically, I want to sort the axis by the highest value of one of the bars, not by the total of the two bars. However, I cannot find a way to do this. Here is a picture for reference
Is there any way I can sort this chart by the highest value of the red bars while ignoring the green? But I still want to be able to see the data from the green bars.
Hi @maynard_savanna ,
Since you are using the legend the chart will be filtered out by the total values (both of them) in this case you need to create two metrics one for each completion type then you can do the sorting by any of the completion types.
The metric shold be similar to this:
Autogens = CALCULATE(SUM('Table'[Value]), 'Table'[Completion Type] = "Autogens")
Call-ins = CALCULATE(SUM('Table'[Value]), 'Table'[Completion Type] = "Call-Ins")
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi Felix,
Thank you for you reply.
I am having some difficulty getting this solution to work. What "value" are you summing to get the metric for autogens and call-ins? I tried using this formula and got an error because the Completion type is a string of text (either "autogen" or "call-in").
Should I assign a value to an autogen or call-in using an if statement (if completion type = autogen then value = 1 else if completion type = call-in then value = 2) in a separate column, and then use the metric formula to allow this to work?
Hi @maynard_savanna ,
The Value is just a column on my mockup in your case you need to use the column you have for the bars in this case must be a count of the completion type the measure should be something similar to this:
Autogens = CALCULATE(Count('Table'[Completion Type]), 'Table'[Completion Type] = "Autogens")
Call-ins = CALCULATE(SUM('Table'[Completion Type]), 'Table'[Completion Type] = "Call-Ins")
Rename the table to the one on your model.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsUser | Count |
---|---|
84 | |
80 | |
72 | |
71 | |
55 |
User | Count |
---|---|
108 | |
106 | |
93 | |
84 | |
66 |