Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
In the image below, I have charted employee salary (y-axis value) by the job level (x-axis).
I have two groups: The orange dots are one group (lt's called them the Orange group) and the second group are the Blue group.
I would like to nest the x-axis so that it shows job level and the group name. Why do I need this? I have no many overlapping dots that I would like to plot the Orange group and blue group separately side by side. So, from left to right my columns of dots would be:
I know how to do this in Tableau, but not in Power BI. Does anyone know how?
Thank you for reading my question.
Solved! Go to Solution.
Hi @ninsights
You can create a measure as:
Measure =
CALCULATE(
MAX('Table'[salary]),
FILTER(
'Table',
'Table'[Group]=MAX('Table'[Group]) && 'Table'[Job level]=MAX('Table'[Job level])
)
)
I used sample data as:
Here is the output:
If you still have some question, please don't hesitate to let me known.
Best Regards,
Link
Is that the answer you're looking for? If this post helps, then please consider Accept it as the solution. Really appreciate!
Hi @ninsights
You can create a measure as:
Measure =
CALCULATE(
MAX('Table'[salary]),
FILTER(
'Table',
'Table'[Group]=MAX('Table'[Group]) && 'Table'[Job level]=MAX('Table'[Job level])
)
)
I used sample data as:
Here is the output:
If you still have some question, please don't hesitate to let me known.
Best Regards,
Link
Is that the answer you're looking for? If this post helps, then please consider Accept it as the solution. Really appreciate!
@v-xulin-mstf : An excellent workaround. Not quite nested but it will do the trick. Thank you very much.
Thank you, @Greg_Deckler . I tried the hierarchy and it wouldn't let me go to the second level. It produced a message about turning all fields to "don't summarize" which is what they were already set to. I think my workaround may be to create a field which will offset the groups around the job level:
If they are orange, subtract 0.1 from the job level; if they are blue, add 0.1 to the job level.
I appreciate your expertise in letting me know the challenges associated with trying to plot a custom hierarchy.
@ninsights You can technically put a hiearchy or ad-hoc hierarchy in the X Axis of a scatter chart but I don't believe you can use Details when you do this and you may run into problems. Also, you don't get the drill arrows initially and have to use the options in the Data/Drill tab of the ribbon. And, all of that said, good probability it won't work like you want it to.
User | Count |
---|---|
93 | |
84 | |
78 | |
75 | |
66 |
User | Count |
---|---|
115 | |
105 | |
93 | |
65 | |
60 |