Forum Discussion
Need help with DAX
- Anonymous2 years ago
Hi Yadidya
ToddChitt Thank you very much for your prompt reply.
I was checking the forum posts and found your post. May I ask if your problem has been solved? If not yet, I have an idea.
If the measure you provided outputs the desired result, then please try it:
Create a measure.
count champion = var currentChampion = [champion] RETURN CALCULATE( COUNTROWS('Table'), FILTER( ALL('Table'), 'Table'[champion] = currentChampion ) )Here is the result.
I've attached a simple demo.
Regards,
Nono Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
ToddChitt my data source is from this link https://www.kaggle.com/datasets/rohanrao/formula-1-world-championship-1950-2020. The CHampion measure is Champion = CALCULATE(FIRSTNONBLANK(drivers[surname],1), TOPN(1, SUMMARIZE(results, drivers[surname], races[year], "Total_Points", [Total_Points]), [Total_Points], DESC)).