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

Join the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now

Reply
Steels
New Member

Summary Table for Columns in different Rows

Cheers,

 

I currently have some problems visualising my data. I have multiple IDs with a full row with different attributes.

IDAttribute 1Attribute 2Attribute 3Attribute 4
10201
21100
32010
41021
50200
6220

0

 

I want to create a new table where the amount of a specific number (example: 2) of every attribute is summarised.

AttributesSummary
Attribute 12
Attribute 23
Attribute 31
Attribute 40

I tried to solve the problem with this measure, but i did not find a proper way to display the data in a diagramm:

 
Attribute 1 =
CALCULATE(
    SUM('Table'[Attribute 1 raw]);
    'Table'[Attribute 1 raw] IN { 2 }
)
 
I have to use DirectQuery.
Thank you in advance!
1 REPLY 1
az38
Community Champion
Community Champion

Hello, Steels

 

You can try this 

Attr1_count = calculate(COUNTROWS(FILTER(ALL('Table');Table[Attribute 1]=VALUES(Table[Attribute 1]))))
Attr2_count = calculate(COUNTROWS(FILTER(ALL('Table');Table[Attribute 2]=VALUES(Table[Attribute 2]))))
Attr3_count = calculate(COUNTROWS(FILTER(ALL('Table');Table[Attribute 3]=VALUES(Table[Attribute 3]))))
Attr4_count = calculate(COUNTROWS(FILTER(ALL('Table');Table[Attribute 4]=VALUES(Table[Attribute 4]))))

So, finaly in columns "Attr1_count" you will see count of each particular value of Attribute1 in the table, for Attribute 2 - the same:

 

309742.PNG


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.