Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

Highlighted
akidhossain
New 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"

Highlighted
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 don't forget to use the "Accept as Solution" button on any posts that helped you resolve your problem or question.
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