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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

DAX Query Correction

i m trying to get the text value from country table based on a condition and a maximium value in nobel prize data table.
Below is my dax query that need to be corrected .
waiting for your  response.
thank you.Relation.PNG
 
 
Country By Max Nobel Prize In Literature =
CALCULATE(
Max('Country Table'[Country] ), 'Nobel Prize Winner Data'[category] = "Literature",
FILTER(
ALL('Nobel Prize Winner Data'),
 
'Nobel Prize Winner Data'[share] = MAX('Nobel Prize Winner Data'[share]
)
)
)
2 REPLIES 2
v-xiaotang
Community Support
Community Support

Hi @Anonymous 

I just want to confirm if you resolved this issue? If yes, you can accept the answer helpful as the solution or share you method and accept it as solution, thanks for your contribution to improve Power BI.

If you need more help, please let me know.

 

Best Regards,

Community Support Team _Tang

If this post helps, please consider Accept it as the solution to help the other members find it more quickly.

tamerj1
Super User
Super User

Hi @Anonymous 

please try

Country By Max Nobel Prize In Literature =
VAR LiteratureTable =
    FILTER (
        ALLSELECTED ( 'Nobel Prize Winner Data' ),
        'Nobel Prize Winner Data'[category] = "Literature"
    )
VAR MaxShare =
    MAXX ( LiteratureTable, 'Nobel Prize Winner Data'[share] )
RETURN
    CALCULATE (
        MAX ( 'Country Table'[Country] ),
        'Nobel Prize Winner Data'[share] = MaxShare,
        CROSSFILTER ( 'Country Table'[Country Abbrevation], 'Nobel Prize Winner Data'[Country Abbrevation], BOTH )
    )

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.