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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.