March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch 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.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
21 | |
19 | |
17 | |
9 | |
5 |
User | Count |
---|---|
36 | |
29 | |
16 | |
15 | |
12 |