Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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_Connections (10) and in another card the date in which that max was achieved (2021-01-02)
Can this be done?
Thanks!
Solved! Go to Solution.
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])
Proud to be a Super User!
@adp_81
Measure for Max Num Conn
Max Num Conn = MAX(Tablename[Num_Connections])
Measure for Date of the Max Num Conn
Max Num Conn Date =
VAR __MAX = [Max Num Conn]
RETURN
MAXX( FILTER( ALL(Tablename[Date]), [Max Num Conn] = __MAX ) , Tablename[Date] )
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
Hello Fowny,
Thank you for your reply. I forgot to mention that my Num_Connections column is a measure... its formula is:
I've been googling about it and found this formula:
MaxConnections = MAXX(ALL(connections), Num_Connections)
but it is not working. I also tried:
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])
Proud to be a Super User!
Thanks ryan_mayu!
That worked perfectly!
you are welcome
Proud to be a Super User!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
99 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
102 | |
87 | |
64 |