Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

dax calculate & max value

Greetings to all, I hope you are well
I am again in the forum with a query, which I suspect can be resolved with a simple dax formula, but I have not yet managed to solve.
in my facts table I have records that represent a theft event for each department, the measure I used to add it was simply a count of rows with "countrows"
Now I would like to place a card with the department that has the most theft, and that this is not affected by the filter context
try to do it with "calculate" and "max" "max" but I do not know how to combine them to get the result I want.
I hope some of those present can help me. Thanks teachers

 

example.jpg

1 ACCEPTED SOLUTION
Zubair_Muhammad
Community Champion
Community Champion

@Anonymous 

 

try this MEASURE

 

Measure =
CONCATENATEX (
    TOPN ( 1, ALL ( TableName[Departamento] ), [Cantidad], DESC ),
    [Departamento],
    ","
)

Regards
Zubair

Please try my custom visuals

View solution in original post

1 REPLY 1
Zubair_Muhammad
Community Champion
Community Champion

@Anonymous 

 

try this MEASURE

 

Measure =
CONCATENATEX (
    TOPN ( 1, ALL ( TableName[Departamento] ), [Cantidad], DESC ),
    [Departamento],
    ","
)

Regards
Zubair

Please try my custom visuals

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.