Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello to you all,
I have a table in which I've created a measure that shows if a record is the first one.
The prblem is that when I select a specific date (Only one date) the value of this calculated measure changes (which is normal since the perimeter has changed)
Is there a way to prevent FIRST_ITEM from changing its Value.
FIRST_ITEM = IF (hourPrev= Min(TOTAL<id_item>timestamp(hourPrev, 'YYYY/M/DD hh:mm:ss.ffffff')), 'YES','NO')
In the second Photo, FIRST ITEM must show NO, since it's not the record corresponding to the ID 2.
Thank you for your help.
Best Regards.
@SRSB sorry there was a typo. try below
=aggr(IF (hourPrev= timestamp(Min(TOTAL<id_item>{<id_item,hourPrev>}hourPrev),'YYYY/M/DD hh:mm:ss.ffffff'), 'YES','NO'),id_item,hourPrev)
@SRSB try below
=only(aggr(IF (only({<id_item,hourPrev>}hourPrev)= Min(TOTAL<id_item>timestamp(only({<id_item,hourPrev>}hourPrev), 'YYYY/M/DD hh:mm:ss.ffffff')), 'YES','NO'),id_item,hourPrev))
you can change your expression to :
IF (hourPrev=aggr(min({<hourPrev=>}hourPrev),ID_ITEM), 'YES','NO')
output:
@SRSB sorry there was a typo. try below
=aggr(IF (hourPrev= timestamp(Min(TOTAL<id_item>{<id_item,hourPrev>}hourPrev),'YYYY/M/DD hh:mm:ss.ffffff'), 'YES','NO'),id_item,hourPrev)
@Taoufiq_Zarra Thanks !
But I don't know why it does not show 'YES' for all the first items.
Is it related to the timestamp format ?
Best regards,
Thank you so much !! 😊