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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
TotallyRow
Regular Visitor

Table/ Chart based on entries in the table - Power Bi

Hi,

 

I'm wondering if someone can help me, please. I've had a search but don't really know what to look for.

I have the table below [A]  (This is a Snippet here are 4 more columns and 35 more rows)

 

My end goal is to create 2 stacked column graphs, one to show how many letters of G, R, W, and L (y-axis) there are per Name(x-axis) and one per Q(x-axis)


I can do this if I can create and populate tables [B] and [C], (inside the table it will show the number of times the letters of G, R, W, and L for each of Name/Q)

 

My question is how can I create and populate tables [B] and [C] using 

  or is there another better way I can create those graphs 

 

Thanks for reading

 

 

Screenshot 2025-02-11 at 13.35.19.png

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @TotallyRow ,

 

According to your description, here are my steps you can follow as a solution.

(1) My test data is the same as yours. Click “transform data” to enter the power query editor, then select the Name column, click “Unpivot other columns”.

vtangjiemsft_0-1739324869784.png

vtangjiemsft_1-1739324883476.png

(2) We can create measures.

Measure =
COUNTROWS (
    FILTER (
        ALL ( 'Table' ),
        [Name] = MAX ( 'Table'[Name] )
            && [Value] = MAX ( 'Table'[Value] )
    )
)
Measure 2 =
COUNTROWS (
    FILTER (
        ALL ( 'Table' ),
        [Attribute] = MAX ( 'Table'[Attribute] )
            && [Value] = MAX ( 'Table'[Value] )
    )
)

(3) Then the result is as follows.

vtangjiemsft_2-1739325015480.png

vtangjiemsft_3-1739325074548.png

 

 

Best Regards,

Neeko Tang

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

3 REPLIES 3
TotallyRow
Regular Visitor

Hi @Anonymous 

Thank you so much!!! Your solution worked as expected, I did not expect such a great step-by-step approach.

 

Thanks Again!

Ashish_Mathur
Super User
Super User

Hi,

After using the "Unpivoting Other Columns" feature, you may just drag this measure to your matrix visual

Measure = countrows(Data)

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

Hi @TotallyRow ,

 

According to your description, here are my steps you can follow as a solution.

(1) My test data is the same as yours. Click “transform data” to enter the power query editor, then select the Name column, click “Unpivot other columns”.

vtangjiemsft_0-1739324869784.png

vtangjiemsft_1-1739324883476.png

(2) We can create measures.

Measure =
COUNTROWS (
    FILTER (
        ALL ( 'Table' ),
        [Name] = MAX ( 'Table'[Name] )
            && [Value] = MAX ( 'Table'[Value] )
    )
)
Measure 2 =
COUNTROWS (
    FILTER (
        ALL ( 'Table' ),
        [Attribute] = MAX ( 'Table'[Attribute] )
            && [Value] = MAX ( 'Table'[Value] )
    )
)

(3) Then the result is as follows.

vtangjiemsft_2-1739325015480.png

vtangjiemsft_3-1739325074548.png

 

 

Best Regards,

Neeko Tang

If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly. 

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.