cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
gonnelli Frequent Visitor
Frequent Visitor

How to count frequency mode price

Hello!

 

I'm trying to count the mode of values of some products.

 

I have a measure that defines the price mode, but I need to count how many times this price appears in my data table.

 

mode: 

 

PRECO_MODA = MINX(TOPN(1;ADDCOLUMNS(VALUES(dash_lg_pricing_mc[preco]);"MODA";CALCULATE(COUNT(dash_lg_pricing_mc[preco])));[MODA];0);dash_lg_pricing_mc[preco])

 

Thanks for the help!

 

1 ACCEPTED SOLUTION

Accepted Solutions
Super User III
Super User III

Re: How to count frequency mode price

HI @gonnelli

 

Try this MEASURE to count Mode

 

Mode Frequency =
VAR mymode = [PRECO_MODA]
RETURN
    COUNTROWS ( FILTER ( dash_lg_pricing_mc, dash_lg_pricing_mc[Preco] = mymode ) )
Try my new Power BI game Cross the River

View solution in original post

2 REPLIES 2
Super User III
Super User III

Re: How to count frequency mode price

HI @gonnelli

 

Try this MEASURE to count Mode

 

Mode Frequency =
VAR mymode = [PRECO_MODA]
RETURN
    COUNTROWS ( FILTER ( dash_lg_pricing_mc, dash_lg_pricing_mc[Preco] = mymode ) )
Try my new Power BI game Cross the River

View solution in original post

Highlighted
gonnelli Frequent Visitor
Frequent Visitor

Re: How to count frequency mode price

Thanks @Zubair_Muhammad!!!

It works for me!

Helpful resources

Announcements
Exclusive LIVE Community Event #3 – Ask Arun Anything

Exclusive LIVE Community Event #3 – Ask Arun Anything

Join us in the third Triple A event!

Meet the 2020 Season 1 Power BI Super Users!

Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

Super User Challenge: Can You Solve These?

Super User Challenge: Can You Solve These?

We're celebrating the start of the New Super User season with our first ever Super User 'Can You Solve These?' challenge.

January 2020 Community Highlights

January 2020 Community Highlights

Make sure you didn't miss any of the things that happened in the community in January!

Top Solution Authors