Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
JIblasco
Helper I
Helper I

Design a DBA Dashboard

Hi,

 

I'm trying to design a Dashboard to control the activity/errors/issues related to our databases. For this purpose, I have created a very easy table with only three columns. KPI, value and timestamp. My target is to create a simple panel (maybe with tarjet cards) that shows the last value of each KPI.

 

AS you can see, I'm saving in my table historical information, but I only want to show the las timestamp row of each KPI (marked in bold).

 

KPI Valuetimestamp
Average CPU time10%2020-08-20 09:20
Average CPU time12%2020-08-20 09:22
Average CPU time2%2020-08-20 09:24
Free Memory70%2020-08-20 09:21
Free Memory75%2020-08-20 09:22
Free Memory10%2020-08-20 09:24

 

Honestly, I have tried but I haven't found the way to do it. ¿Could you please help me?

 

Thanks in advance.

2 ACCEPTED SOLUTIONS
Greg_Deckler
Super User
Super User

@JIblasco - You can create a selector for this

Selection selector for selection options

VAR __Max MAXX (ALL('Table'),[timestamp])

Return

IF(MAX('Table'[timestamp]) at __Max,1,0)

See Complex Selector - https://community.powerbi.com/t5/Quick-Measures-Gallery/The-Complex-Selector/m-p/1116633#M534

Also, maybe Lookup Min/Max - https://community.powerbi.com/t5/Quick-Measures-Gallery/Lookup-Min-Max/m-p/985814#M434



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

v-easonf-msft
Community Support
Community Support

Hi , @JIblasco 

As mentioned by @amitchandak  ,please create a calculated column:

Rank = RANKX(FILTER(ALL('Table'),'Table'[KPI ]=EARLIER('Table'[KPI ])),'Table'[timestamp],,DESC)

 And applied it to filter pane:

206.png

 

Best Regards,
Community Support Team _ Eason

View solution in original post

4 REPLIES 4
v-easonf-msft
Community Support
Community Support

Hi , @JIblasco 

As mentioned by @amitchandak  ,please create a calculated column:

Rank = RANKX(FILTER(ALL('Table'),'Table'[KPI ]=EARLIER('Table'[KPI ])),'Table'[timestamp],,DESC)

 And applied it to filter pane:

206.png

 

Best Regards,
Community Support Team _ Eason

amitchandak
Super User
Super User

@JIblasco , Take these two measures along with KPI in you visual

new timestamp = lastnonblank(table[timestamp],blank())
new Value = lastnonblankvalue(table[timestamp],max(Table[Value]))

 

Or create a Rank of time inside KPI and filter on 1

For Rank Refer these links
https://radacad.com/how-to-use-rankx-in-dax-part-2-of-3-calculated-measures
https://radacad.com/how-to-use-rankx-in-dax-part-1-of-3-calculated-columns
https://radacad.com/how-to-use-rankx-in-dax-part-3-of-3-the-finale
https://community.powerbi.com/t5/Community-Blog/Dynamic-TopN-made-easy-with-What-If-Parameter/ba-p/3...

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Hi,

 

Thank you for your quick response. I have decided to create a view in the database with the las timestamp of each KPI. Anyway, thank you for the rank refers.

 

 

Greg_Deckler
Super User
Super User

@JIblasco - You can create a selector for this

Selection selector for selection options

VAR __Max MAXX (ALL('Table'),[timestamp])

Return

IF(MAX('Table'[timestamp]) at __Max,1,0)

See Complex Selector - https://community.powerbi.com/t5/Quick-Measures-Gallery/The-Complex-Selector/m-p/1116633#M534

Also, maybe Lookup Min/Max - https://community.powerbi.com/t5/Quick-Measures-Gallery/Lookup-Min-Max/m-p/985814#M434



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.