Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hey guys, I need to display the customer names as a column in table visual and count of cutomers in the Totals of the same column just like below. Please help me with some ideas. Thanks in advance.
| Row | CustNames |
| 1 | A |
| 2 | B |
| 3 | C |
| 4 | D |
| Total | 4 |
Solved! Go to Solution.
Hi @prajwal1
You can try
CustNames =
IF (
ISINSCOPE ( 'Table'[Customer Name] ),
SELECTEDVALUE ( 'Table'[Customer Name] ),
DISTINCTCOUNT ( 'Table'[Customer Name] )
)
Hi @prajwal1
Please refer to attached sample file withthe proposed solution
CustNames =
IF (
HASONEVALUE ( 'Index'[Row Number] ),
MAXX (
FILTER (
ADDCOLUMNS (
VALUES ( 'Table'[Customer Name] ),
"@Rank", RANKX ( ALLSELECTED ( 'Table'[Customer Name] ), 'Table'[Customer Name],, ASC )
),
[@Rank] = VALUES ( 'Index'[Row Number] )
),
'Table'[Customer Name]
),
DISTINCTCOUNT ( 'Table'[Customer Name] )
)
Hi @prajwal1
Please refer to attached sample file withthe proposed solution
CustNames =
IF (
HASONEVALUE ( 'Index'[Row Number] ),
MAXX (
FILTER (
ADDCOLUMNS (
VALUES ( 'Table'[Customer Name] ),
"@Rank", RANKX ( ALLSELECTED ( 'Table'[Customer Name] ), 'Table'[Customer Name],, ASC )
),
[@Rank] = VALUES ( 'Index'[Row Number] )
),
'Table'[Customer Name]
),
DISTINCTCOUNT ( 'Table'[Customer Name] )
)
Hello @tamerj1 ,
Your solution is just perpect but I have another level of difficulty would be great if you can suggest.
In the table I have measure value as well which is giving wrong value with CustName column.
Can you help !!
Hi @prajwal1
You can try
CustNames =
IF (
ISINSCOPE ( 'Table'[Customer Name] ),
SELECTEDVALUE ( 'Table'[Customer Name] ),
DISTINCTCOUNT ( 'Table'[Customer Name] )
)
This is working when the original column is there in the table. How can I do this without using that column in the table.?
@prajwal1
Which column are you going to use in the table? Or you you want to see the result on a card visual? Please clarify
Not in a Card. I want to display in a table visual like I mentioned in my question.
I want to display Customer names in a column and the total number of customers in 'Totals' in table visual without using the original column in the table.
The above Dax expression working when the original column is also available in the table visual. I don't want to use that column. I will use the measure only
I understand, but there must be some column placed there in the table. Such solutions cannot be straightforward as it should provide a workaround over this property of power bi table. I'll be back to office shortly. Let me see what can I do.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 6 | |
| 5 | |
| 4 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 24 | |
| 21 | |
| 12 | |
| 10 | |
| 8 |