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
CLQ
Helper I
Helper I

Problem displaying data in a bar chart

Hi! I am having a problem: I have several columns (reason1/2/3/4) where there can be 4 different values, in text format:
-Cold Food
-Smashed Food
-Rude Delivery
-Other

And each row represents a different order.
Not necessarily all the "reason" columns will have data.

CLQ_1-1664380491090.png
-->Count: 3 "Colld Food"; 4 "Rude Delivery"; 4 "Other"; 5 "Smashed Food"

So, I want to count how many of each "complaint" exist, that is, that in PBI I want something like this:

 

CLQ_2-1664380949454.png

 

My problem is that my idea is based on using "count", when adding it the numbers are wrong, that is, if I have two columns with data in a row, both are added. Example:

I only have two orders with a "Cold Food" complaint, but one of those orders also has "Rude Delivery", instead of showing a 2, I get a three because what i do is similar to: 
CountOrder = count('Table'[Reason1])+count('Table'[Reason2])+ ......

Any help is welcome. Thank you

 

 

 

4 REPLIES 4
VijayP
Super User
Super User

@CLQ for each value the reason is also will be in another column and whihc can be used as a parameter or slicer




Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
MY Blog || My YouTube Channel || Connect with me on Linkedin || My Latest Data Story - Ageing Analysis

Proud to be a Super User!


Oh, I think I understood. The problem is that my file is not the dataset, but it has a dynamic connection so I can't use PQ 

VijayP
Super User
Super User

@CLQ 

In power query editor unpivot all reason columns and bring them into single column

Then try to use that in visual to get the requried visual




Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
MY Blog || My YouTube Channel || Connect with me on Linkedin || My Latest Data Story - Ageing Analysis

Proud to be a Super User!


I'm sorry, I didn't understand: if I have all the data in a single column, how would PBI recognize the four different texts and then count each one so that it looks like the graph I posted?

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.

Top Solution Authors