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
mshashmi
Frequent Visitor

Combine multiple rows into single one for use of clustered chart

Hi everyone

 

I have a table suppose like this

 

Table

 

Column1         Column2

11                     Closed

56                     Open

82                     Resolved

78                     Unresolved

 

 

 

Now I want to make a clustered column chart. It should have two bars, one for both open and unresolved i.e. total 134 and another for closed and resolved i.e. total 93.

How can this be done?

2 ACCEPTED SOLUTIONS
GilbertQ
Super User
Super User

Hi @mshashmi

 

I would suggest doing it with the following measure

 

Total = sum('table1'[Column1])

Open & Unresolved = CALCULATE([Total],'Table1'[Column2] = "Open" && 'Table1'[Column2] ="Unresolved")

Closed & Resolved = CALCULATE([Total],'Table1'[Column2] = "Closed" && 'Table1'[Column2] ="Resolved")

And you can then use those two measures on your clustered column chart.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!







Power BI Blog

View solution in original post

@mshashmi,

 

Just to correct it. In this case, we'll use the OR operator (||), not the AND operator (&&).

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

View solution in original post

5 REPLIES 5
GilbertQ
Super User
Super User

Hi @mshashmi

 

I would suggest doing it with the following measure

 

Total = sum('table1'[Column1])

Open & Unresolved = CALCULATE([Total],'Table1'[Column2] = "Open" && 'Table1'[Column2] ="Unresolved")

Closed & Resolved = CALCULATE([Total],'Table1'[Column2] = "Closed" && 'Table1'[Column2] ="Resolved")

And you can then use those two measures on your clustered column chart.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!







Power BI Blog

@GilbertQ Thanks

 

It worked perfectly

@mshashmi,

 

Just to correct it. In this case, we'll use the OR operator (||), not the AND operator (&&).

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

@v-chuncz-msft Thanks

 

I figured it out though

Glad to help out.




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!







Power BI Blog

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.