Hi All,
I am very new to Power BI, but great to be part of this membership.
I have a spreadsheet named ‘P&D Purchases’ and within that, a column named ‘Purchase Amount’. The spreadsheet is a summary of all pay and display purchases from different car parks across the UK.
Does anybody know how to write a DAX formula to calculate the mode for Purchase Amount?
Thanks in advance.
Chris
Hello Chris,
I’d like to welcome you among us in the Enterprise DNA Forums,
It would be great to have a sample PBIx of your data, but while you get that sorted, here is the usual Formula that i use to calculate the mode for any Value in a table Data :
MINX (
TOPN (
1,
ADDCOLUMNS (
VALUES ( Data[Value] ),
“Frequency”, CALCULATE ( COUNT ( Data[Value] ) )
),
[Frequency],
0
),
Data[Value]
)
If you managed to make it work, please mark this as a solution
2 Likes
Hi @chrisgreenslade, did the response provided by @m.abdelkarim help you solve your query? If not, how far did you get and what kind of help you need further? If yes, kindly mark as solution the answer that solved your query. Thanks!
Thank you @m.abdelkarim. This works!