Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
NamanMittal
Frequent Visitor

How to show two measures as stack bars and one measure as normal in one chart?

I have four measures A , B , C ,Total.I want to show A and B as one stack bar and C and Total as normal bar against month.

Is that possible via DAX? If yes, How?

5 REPLIES 5
v-yuezhe-msft
Employee
Employee

@NamanMittal,

I am not very clear about your desired chart. Could you please post a screenshot? Do all the measures share a single x-axis? If so, when you drag all  the measures into Stack bar chart, you will get the following chart:
1.PNG

Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi Lydia,

 

Thanks for a try. I have 4 measures A, B, C , D. I want stack bar graph to show A and B as one stacked bar and C and D for another stack bar and all these against my time  x-axis.

 

@NamanMittal,

You may need to create two new measures, one to combine A and B, one to combine C and D. Please share sample data of your table and post a screenshot about your desired chart.

Regard,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

I also tried this. But I actually want to show the share of A & B in A-B stack also using diff colors. Similarly for C-D stack.

And as for data, I am having dummy currently, four measures A,B,C,D and month as dimension. If I use normal stack bar, It show all 4 measures in one for each month. (which is normal.).

But I want two group 2 measures in one bar as stack and 2 measures in another bar as stack , for each month.

@NamanMittal,

I am not very clear about your expected chart. Please post a screenshot about your desired result. Sample data is also appreciated.

Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.