Forum Discussion
Specifying MODE (or a user-defined aggregate function) when using DAX SUMMARIZE
- 5 years ago
Anonymous , refer if old solution can help
https://community.powerbi.com/t5/Desktop/Calculating-modes/m-p/46313
- Anonymous5 years ago
Hi Anonymous ,
This is the data I created. I define the rules to calculate the most frequent string of name:
I learned that the mode expression is the most frequently displayed value, and you can use this method instead:
1. Create Calculated column.
Column = VAR summary = SUMMARIZE ( 'Table', 'Table'[name], "Count",COUNTX(FILTER('Table','Table'[name]=EARLIER('Table'[name])),'Table'[name]) ) VAR _max = MAXX ( summary, [Count]) RETURN MAXX ( FILTER ( summary, [Count] = _max ), [name] )2. Result:
You can downloaded PBIX file from here.
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous , refer if old solution can help
https://community.powerbi.com/t5/Desktop/Calculating-modes/m-p/46313
- Anonymous5 years agoNot applicable
Thank you. I saw that in my research but can't work out how to use the formula. Does it define a MODE function? Or somehow add a column?
- Anonymous5 years agoNot applicable
Thank you. I did get this working.
Though I still think that MODE should be offered as a standard aggregate function