This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreDid you hear? There's a new SQL AI Developer certification (DP-800). Start preparing now and be one of the first to get certified. Register now
Hi
I have table like this below and would like to get the key values or totals of each in seperate table
| TLName | product | count |
| A | abc | 0 |
| A | cba | 0 |
| A | sdf | 1 |
| A | sgdg | 0 |
| B | rsdf | 1 |
| B | uiyuiu | 1 |
| B | rwe | 0 |
| B | yiuy | 1 |
| C | mnbmn | 1 |
| C | ouio | 1 |
| C | tetr | 1 |
Need total table like this
| TLName | product | count | percentage |
| A | 4 | 1 | 25% |
| B | 4 | 2 | 50% |
| C | 3 | 3 | 100% |
Solved! Go to Solution.
Hi @mahaboobpathan ,
According to your description, here are my steps you can follow as a solution.
(1) My test data is the same as yours.
(2) We can create a table.
Table 2 =
DISTINCT (
SELECTCOLUMNS (
'Table',
"TLName", 'Table'[TLName],
"product", COUNTROWS ( FILTER ( 'Table', 'Table'[TLName] = EARLIER ( 'Table'[TLName] ) ) ),
"count",
CALCULATE (
SUM ( 'Table'[count] ),
FILTER ( 'Table', 'Table'[TLName] = EARLIER ( 'Table'[TLName] ) )
),
"percentage",
DIVIDE (
CALCULATE (
SUM ( 'Table'[count] ),
FILTER ( 'Table', 'Table'[TLName] = EARLIER ( 'Table'[TLName] ) )
),
COUNTROWS ( FILTER ( 'Table', 'Table'[TLName] = EARLIER ( 'Table'[TLName] ) ) ),
0
)
)
)
(3) Then the result is as follows.
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.
Hi @mahaboobpathan ,
According to your description, here are my steps you can follow as a solution.
(1) My test data is the same as yours.
(2) We can create a table.
Table 2 =
DISTINCT (
SELECTCOLUMNS (
'Table',
"TLName", 'Table'[TLName],
"product", COUNTROWS ( FILTER ( 'Table', 'Table'[TLName] = EARLIER ( 'Table'[TLName] ) ) ),
"count",
CALCULATE (
SUM ( 'Table'[count] ),
FILTER ( 'Table', 'Table'[TLName] = EARLIER ( 'Table'[TLName] ) )
),
"percentage",
DIVIDE (
CALCULATE (
SUM ( 'Table'[count] ),
FILTER ( 'Table', 'Table'[TLName] = EARLIER ( 'Table'[TLName] ) )
),
COUNTROWS ( FILTER ( 'Table', 'Table'[TLName] = EARLIER ( 'Table'[TLName] ) ) ),
0
)
)
)
(3) Then the result is as follows.
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.
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 34 | |
| 31 | |
| 30 | |
| 21 | |
| 16 |
| User | Count |
|---|---|
| 63 | |
| 53 | |
| 31 | |
| 23 | |
| 23 |