Forum Discussion
Anonymous
7 years agoNot applicable
Count Based on Group
Dear All, I have a data like this, Sample File is attached for your ref: Sample PBIX In this what I have already calculated is --> "The Maximum Sales". Referring to the above ...
- 7 years ago
Here is a measure to solve your problem
Split =var summaryTable = summarize(Table1,Table1[Sales],"count", count(Table1[ID]))var salesName = FIRSTNONBLANK(SELECTCOLUMNS(filter(summaryTable,maxx(summaryTable,[count])),"Sales",[Sales]),true)var theSplit = filter(summarize(Table1,Table1[Sales],Table1[Reason],"count", count(Table1[ID])),Table1[Sales]=salesName)returnconcatenatex(theSplit, [count] & " " & [Reason], ", ")
yelsherif
7 years agoResolver IV
Here is a measure to solve your problem
Split =
var summaryTable = summarize(Table1,Table1[Sales],"count", count(Table1[ID]))
var salesName = FIRSTNONBLANK(SELECTCOLUMNS(filter(summaryTable,maxx(summaryTable,[count])),"Sales",[Sales]),true)
var theSplit = filter(summarize(Table1,Table1[Sales],Table1[Reason],"count", count(Table1[ID])),Table1[Sales]=salesName)
return
concatenatex(theSplit, [count] & " " & [Reason], ", ")
- yelsherif7 years agoResolver IV
I hope the measure worked for you, please accept it as a solution
Thanks