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: 
Anonymous
Not applicable

concat two firstsortedvalue expression.

Hi,

I want to combine two expression come as a single filed.

concat( FirstSortedValue([DWH_IM_MONTH],-AGGR(SUM(SALES_IM_QTY),DWH_SKU_REF_NO,DWH_IM_MONTH,DWH_IM_DATE_YEAR)) , FirstSortedValue([DWH_IM_DATE_YEAR] , -AGGR(SUM(SALES_IM_QTY),DWH_SKU_REF_NO,DWH_IM_MONTH,DWH_IM_DATE_YEAR)),'&')

can someone tell me whats wrong with this Formula.

2 Replies
jerem1234
Specialist II
Specialist II

For something like that, you don't want to use the concat function. The concat function will cycle through a field and concat all the values together. What you want to do is combine the two expressions into one value. Try:

=FirstSortedValue([DWH_IM_MONTH],-AGGR(SUM(SALES_IM_QTY),DWH_SKU_REF_NO,DWH_IM_MONTH,DWH_IM_DATE_YEAR)) & '&'  & FirstSortedValue([DWH_IM_DATE_YEAR] , -AGGR(SUM(SALES_IM_QTY),DWH_SKU_REF_NO,DWH_IM_MONTH,DWH_IM_DATE_YEAR))


Hope this helps!

Anonymous
Not applicable
Author

Thank you so much Jermiah, worked absolutely fine, Really appreciate your quick response.