Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

Announcements
QlikWorld, June 24-25, 2020. Free virtual event for DI and DA gurus. Register Today
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor
Contributor

FirstSortedValue() - "Error in Calculated Dimension"

Hello! 

 

I am trying to use the FirstSortedValue() function to return a Stage of a SKU based on rankings of the Stage. The following is what I have tried for my calculated dimension:

(1) FirstSortedValue([Stage],[Stage Ranking])  ------> Error in Calculated Dimension


(2)  FirstSortedValue(AGGR([Stage],[SKU]),[Stage Ranking])  ------> Error in Calculated Dimension

Also to note: I have confirmed the the field [Stage Ranking] is in NUM format.

Any feedback on what I may be doing wrong? Thank you! 

3 Replies
Highlighted
Partner
Partner

Re: FirstSortedValue() - "Error in Calculated Dimension"

Digital Support
Digital Support

Re: FirstSortedValue() - "Error in Calculated Dimension"

Just a couple of other links for you that might be helpful:

https://community.qlik.com/t5/Qlik-Design-Blog/Pitfalls-of-the-Aggr-function/ba-p/1463275

https://community.qlik.com/t5/Qlik-Design-Blog/Don-t-get-aggr-avated-using-aggr/ba-p/1464136

Not sure they will really help, but worth a read.

Cheers,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.
Highlighted
MVP & Luminary
MVP & Luminary

Re: FirstSortedValue() - "Error in Calculated Dimension"

It sounds like you want to do this calc over SKU, so I believe a calculated dim would be:

Aggr(FirstSortedValue([Stage],[Stage Ranking]), SKU)

-Rob