Forum Discussion

adp_81's avatar
adp_81
Frequent Visitor
4 years ago
Solved

Showing maximun value in Card

I have a table, something like: Date Num_Connections 2021-01-01 5 2021-01-02 10 2021-01-03 1 2021-01-04 5 ... ...   I would like to show in a Card the maximum Num_Connec...
  • ryan_mayu's avatar
    ryan_mayu
    4 years ago

    adp_81 

    maybe you can try this

    Measure 2 = maxx(values('Table'[Date]),[Num_Connections])
    
    Measure 3 = 
    VAR tbl= SUMMARIZE('Table','Table'[Date],"connections",distinctcount('Table'[Num_Connections]))
    VAR tbl2=ADDCOLUMNS(tbl,"CHECK",RANKX(TBL,[connections],,DESC))
    return maxx(FILTER(tbl2,[CHECK]=1),'Table'[Date])