Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
kris_vliegen
Partner - Creator III
Partner - Creator III

max datetime per station

Hello,

I'm working on a dashboard for fuelstations.

They will see how much fuel there is in a tank per station and per fueltype.

The volume is measured several times a day on different timestamps per station.

The defenition of stock is

=num(sum( { $ < DateTimeNum =  {'$(=Max(DateTimeNum))'} , CalYear = , CalQuarter= , CalMonth=, CalDay=  >}Stock15),'#.##0,00 L')

As you can see in the picture he takes the max(dateTimeNum) of all the shops. So only for shop 150 (the shop with the highest datetime is showed. Does anybody knows how I can get the latest stock of all the shops?

Regards,

Kris

Stock.JPG.jpg

2 Replies
swuehl
MVP
MVP

Maybe like

=FirstSortedValue(

          aggr(sum(Stock15), Station, [Artikelomschrijvi...], DateTimeNum),

           -aggr(DateTimeNum, Station, [Artikelomschrijvi...], DateTimeNum)

)

Check the Field names, I just input the parts that I see in the header.

kris_vliegen
Partner - Creator III
Partner - Creator III
Author

Hello Swuehl, Thanks for your answer. It's working fine 🙂