cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
MAAbdullah47
Helper V
Helper V

Get The Highest Count Frequency Of Item Name from data set

Hi, I have a data set (Order Id, Customer Id, Item Name, Quantity, Total Sales, Order Type), I want to get the following:

 

1-The Highest Count(Frequency) For Item Name In All orders. 

2-The Highest Count frequency Of the Order type (Pick-up, Delivery, Di-in).   

 

Thank You 

2 ACCEPTED SOLUTIONS
Greg_Deckler
Super User
Super User

In general, you will want to use a SUMMARIZE to summarize the information, grouping by what you want to group by and doing a COUNT. You would then grab the name of the item with the MAX count.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

v-yuezhe-msft
Microsoft
Microsoft

@MAAbdullah47,

Please check the example in the blog below. If you need detailed DAX fit for your scenario, please help to share sample data of your table and post expected result in table.

http://www.dutchdatadude.com/power-bi-pro-tip-show-top-x-results-with-rankx-function/

Regards,
Lydia Zhang

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
v-yuezhe-msft
Microsoft
Microsoft

@MAAbdullah47,

Please check the example in the blog below. If you need detailed DAX fit for your scenario, please help to share sample data of your table and post expected result in table.

http://www.dutchdatadude.com/power-bi-pro-tip-show-top-x-results-with-rankx-function/

Regards,
Lydia Zhang

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Greg_Deckler
Super User
Super User

In general, you will want to use a SUMMARIZE to summarize the information, grouping by what you want to group by and doing a COUNT. You would then grab the name of the item with the MAX count.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...

Can You narrow you answer by an example? 

Ok Can You Show me at least how to get the Highest (TopN) from the field?

 

No Need to summarize , Please advise.

Can you help me by some example text cuz I'm usually do this by (R) ?

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors