Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Good morning, I'm trying to get my last registered amount based on the date and product, but the registration date in a single day brings different hours and minutes, I want to get the last registration of your last hour by product.
I have managed to bring the last reading date by product, but I can't find how to bring the inventories.
I am attaching images and the formula that I have used, I would appreciate your help.
AGGR (
IF ( Sum( inventory ) > 0,
DATE ( AGGR (
Max( read_date ),
EstacionID, Producto ), 'DD-MM-YYYY- HH:mm:ss' ) ),
EstacionID, Producto )
Hi, you may have to format read_date as such;
Timestamp(Timestamp#(read_date ,'DD/MM/YYYY hh:mm:ss.0'),'DD-MM-YYYY hh:mm:ss') as read_date
Dimensions: EstacionID and Producto
read_date: =Max(read_date)
Inventory: =FirstSortedValue(Inventory, -read_date)
@Daniboy2019 try below
Assuming you have Dimensions EstacionID,read_date,Producto, you can write below measure
=sum(aggr(FirstSortedValue( aggr(sum(Inventory),EstacionID,Producto,read_date),-read_date),EstacionID,Producto))
If you have unique value on combination of EstacionID,read_date,Producto, Inventory you can use below expression
sum(aggr(FirstSortedValue(Inventory,-read_date),EstacionID,Producto))
Note: Uncheck suppress zero value option from chart properties
@Daniboy2019 try below
Assuming you have Dimensions EstacionID,read_date,Producto, you can write below measure
=sum(aggr(FirstSortedValue( aggr(sum(Inventory),EstacionID,Producto,read_date),-read_date),EstacionID,Producto))
If you have unique value on combination of EstacionID,read_date,Producto, Inventory you can use below expression
sum(aggr(FirstSortedValue(Inventory,-read_date),EstacionID,Producto))
Note: Uncheck suppress zero value option from chart properties
This worked for me, thanks a lot for the help 😊
Thank you very much for the help 🙂 , I will try to apply this formula 🤗