Forum Discussion

Key123's avatar
Key123
Regular Visitor
2 years ago
Solved

Most Frequent value working with slicer

I need help with the displaying the most frequent value in Card visualisation while the selected filters in slicers.  I have tried to create new measure with the most frequest month: TopMonth = C...
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi Key123 ,

     

    Based on your description, I created simple samples and you can check the results below:

     

    Most Frequent = 
    var _table=ADDCOLUMNS(ALLSELECTED('Table'),"year",YEAR('Table'[Data]),"month",MONTH('Table'[Data]))
    var _b=  SUMMARIZE(_table,[month],"count of id",COUNT('Table'[ID]))
    return CALCULATE(MAXX(FILTER(_b,[count of id]=MAXX(_b,[count of id])),[month]))

     

    An attachment for your reference. Hope it helps!

     

    Best regards,
    Community Support Team_ Scott Chang

     

    If this post helps then please consider Accept it as the solution to help the other members find it more quickly.