Forum Discussion
Adding Axe category to measure
hello everyone
under this photo you can see that i calculated each of these bar columns with a measure but i want to show the visual like this :
is there a possible way to do it by adding category to the measures?
Hello Mannai ,
I am assuming you have three measures as Femmes, Hommes and Key People.
Please follow below steps-Step 1.
Create a table with name MeasureTable and column "MeasrureName" having three rows- Femmes, Hommes and Key People.
Step 2- Create Measure as-
Measure = VAR A = SELECTEDVALUE(MeasureTable[MeasureName]) Return SWITCH(A,"Femmes",[Femmes], "Hommes",[Hommes], "Key People",[Key People])Step 3- In bar chart in axis show MeasureName column from the table created and use above measure in values.
Please mark it as answer if it resolves your issue. Kudos are also appreciated.
3 Replies
- Shishir22
Solution Sage
Hello Mannai ,
I am assuming you have three measures as Femmes, Hommes and Key People.
Please follow below steps-Step 1.
Create a table with name MeasureTable and column "MeasrureName" having three rows- Femmes, Hommes and Key People.
Step 2- Create Measure as-
Measure = VAR A = SELECTEDVALUE(MeasureTable[MeasureName]) Return SWITCH(A,"Femmes",[Femmes], "Hommes",[Hommes], "Key People",[Key People])Step 3- In bar chart in axis show MeasureName column from the table created and use above measure in values.
Please mark it as answer if it resolves your issue. Kudos are also appreciated.
- ribisht17
Super User
Please check the available options here
You should have that category at the Axis
NOTE: >>> (From the link below)
"No of spaces" or "GROUPs of VALUES" depend on the number of DISTINCT categories you have in your X-Axis Field
I think without X-Axis you won't be able to give space between bars
Need to increase gaps between bars - Microsoft Power BI Community
Regards,
Ritesh
- NickolajJessen
Solution Sage
I would probably try using the axis, as ribisht17 suggested
I'm guessing the reason you're using measures is to aggregate multiple categories into the "main" categories: Homme, Femme, Key people.
What i would do is go and create a Calculated Column, that does this aggregation and use this new colum on the axis