We're giving away 30 tickets for FREE! Share your story, your vision, or your hustle and tell us why YOU deserve a ticket.
Apply nowWin a FREE 3 Day Ticket to FabCon Vienna. Apply now
I have this DAX code as a measure but having some trouble with it.
The returned table contains this data
Agent | Calls |
John | 5132 |
How do I get the name "John" to be returned in my measure above.
Solved! Go to Solution.
Hi,
I am not sure how your semantic model looks like, but I tried to create a sample pbix file like below.
Please check the below picture and the attached pbix file whether it suits your requirement.
Top calls agent: =
CONCATENATEX(
TOPN(
1,
ADDCOLUMNS(
SUMMARIZE(
'Data',
'Agent'[Agent]
),
"@callstotal", CALCULATE(SUM('Data'[Calls]))
),
[@callstotal],
DESC
),
'Agent'[Agent],
", "
)
Hi,
I am not sure how your semantic model looks like, but I tried to create a sample pbix file like below.
Please check the below picture and the attached pbix file whether it suits your requirement.
Top calls agent: =
CONCATENATEX(
TOPN(
1,
ADDCOLUMNS(
SUMMARIZE(
'Data',
'Agent'[Agent]
),
"@callstotal", CALCULATE(SUM('Data'[Calls]))
),
[@callstotal],
DESC
),
'Agent'[Agent],
", "
)
User | Count |
---|---|
13 | |
12 | |
8 | |
8 | |
6 |
User | Count |
---|---|
28 | |
19 | |
13 | |
11 | |
7 |