The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
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 |
---|---|
15 | |
12 | |
8 | |
7 | |
7 |
User | Count |
---|---|
24 | |
20 | |
12 | |
9 | |
7 |