Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
My expression using FirstSortedValue () is returning two values, I even tried using IF to filter additional rows, but that just changed the output from getting C & F to F & -
Original:
=Aggr(FirstSortedValue(DISTINCT [FEED_REPORT_STATUS_LOG_QV.STATUS],-[FEED_REPORT_STATUS_LOG_QV.VERSION_NO]),[FEED_REPORT_STATUS_LOG_QV.COB_DATE],[FEED_REPORT_STATUS_LOG_QV.REP_NAME],EVENT_RANK)
Output: C & F
Modified:
=if(EVENT_RANK =1,Aggr(FirstSortedValue(DISTINCT [FEED_REPORT_STATUS_LOG_QV.STATUS],-[FEED_REPORT_STATUS_LOG_QV.VERSION_NO]),[FEED_REPORT_STATUS_LOG_QV.COB_DATE],[FEED_REPORT_STATUS_LOG_QV.REP_NAME],EVENT_RANK))
Output: F & -
following
What are you expecting the value, Is that based on event rank?
I am trying to get the Status, for the Max Version (23 here) for a latest COB Date/Given COB Date for a Report Name with Event Rank = 1
Can't you simply write?
=FirstSortedValue(DISTINCT [FEED_REPORT_STATUS_LOG_QV.VERSION_NO], -[FEED_REPORT_STATUS_LOG_QV.COB_DATE])
May be this
FirstSortedValue(DISTINCT {<EVENT_RANK = {1}>} [FEED_REPORT_STATUS_LOG_QV.STATUS], -[FEED_REPORT_STATUS_LOG_QV.VERSION_NO])
FirstSortedValue(DISTINCT {<EVENT_RANK = {1}>} ,{[FEED_REPORT_STATUS_LOG_QV.EVENT_NAME] ={'BATCH'}>}[FEED_REPORT_STATUS_LOG_QV.STATUS], -[FEED_REPORT_STATUS_LOG_QV.VERSION_NO])
would this be right, if I have two conditions to be used in the expression ? (additional condition being [FEED_REPORT_STATUS_LOG_QV.EVENT_NAME] ='BATCH')
This
FirstSortedValue(DISTINCT {<EVENT_RANK = {1}>},[FEED_REPORT_STATUS_LOG_QV.EVENT_NAME] = {'BATCH'}>}[FEED_REPORT_STATUS_LOG_QV.STATUS], -[FEED_REPORT_STATUS_LOG_QV.VERSION_NO])
You had an extra '{' in your expression
Getting error for this expression ..
My bad, try this
FirstSortedValue(DISTINCT {<EVENT_RANK = {1}, [FEED_REPORT_STATUS_LOG_QV.EVENT_NAME] = {'BATCH'}>}[FEED_REPORT_STATUS_LOG_QV.STATUS], -[FEED_REPORT_STATUS_LOG_QV.VERSION_NO])