Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
jerryr125
Creator III
Creator III

FirstSortedValue Question

Hi and Happy 2021 !

I have a question regarding The FirstSortValue function.

 

I have the following Expression : 

Forecast Out of Stock Date:
=Date(FirstSortedValue(RTWCALENDARDATE, -Aggr( If(($(vForecastCTCBOHProductInvCalculcation)) > 0, -1E10, $(vForecastCTCBOHProductInvCalculcation)), RTWCALENDARDATE)),'MM/DD/YYYY')

And the following variable :

vForecastBOHProductInvCalculation

IF(Num#(Date(RTWCALENDARDATE,'YYYYMMDD'),'0') > $(vForecastDateStartNumeric),
($(vBOHProductInvsFinal))-aggr(Rangesum(Above((IF(Num#(Date(RTWCALENDARDATE,'YYYYMMDD'),'0') > $(vForecastDateStartNumeric),$(vForeCastProdTotal),$(vForeCastProdTotal))),0,RowNo())),RTWCALENDARDATE),
($(vBOHProductInvsFinal))-aggr(Rangesum(Above((IF(Num#(Date(RTWCALENDARDATE,'YYYYMMDD'),'0') > $(vForecastDateStartNumeric),$(vForeCastProdTotal),$(vForeCastProdTotal))),0,RowNo())),RTWCALENDARDATE))

 

Each of my locations has a  "Forecast Out of Stock Date".  I placed this in a table visualization with the name of the location.

The Forecast Out of Stock Date value does not appear in the table - only  when I filter on a specific location the expression shows the specific "Forecast Out of Stock Date" for the specific location (works perfect).

Any thoughts ? Jerry

Labels (1)
0 Replies