Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Maximum of Count

Hello, I am new to power bi. I am facing a problem. I want to cre ate a new column as "Highest Target Quantity" which shows for Jan 1st Highest Target Quantity achieved as 2 and for Jan 2 Highest ...
  • v-frfei-msft's avatar
    v-frfei-msft
    7 years ago

    Hi Anonymous,

     

    One sample for your reference. Here we can create two measures as below to get the result as we need.

     

    MAX = CALCULATE(COUNTROWS(Table1),ALLEXCEPT(Table1,Table1[DATE]),VALUES(Table1[ITEM]))
    MAXX = MAXX(Table1,[MAX])

     

    For more details, please check the pbix as attached.

     

    Regards,

    Frank

  • v-frfei-msft's avatar
    v-frfei-msft
    7 years ago

    Hi Anonymous,

     

    To create another new measure and make the table visual filterd by the measure.

     

    Measure = var result = MAXX(ALLEXCEPT(Table1,Table1[DATE]),[MAXX])
    return
    IF([MAX]=result,1,0)

     

    Regards,

    Frank