Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Our next Qlik Insider session will cover new key capabilities. Join us August 11th REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
QFanatic
Creator
Creator

Syntax using FirstSortedValue in set Analysis

Hi

I have a model that contains FY in Dual format (created using Dual(fYear-1 &'/'& fYear, fYear) as FY).

In my Set analysis I want to count Distinct Periods where the PeriodID = max PeriodID for my FY(Financial year)

The syntax looks like this...

count({<Channel = {'Banking App'},CostName={'Prev_Yr_Actuals'},Table_Type = {'Rates'},FY = {'=firstsortedvalue(FY,-PeriodID)'}>}DISTINCT Period)

however, the statement doesnt resolve correctly..it resolves to:

FY={'=firstsortedvalue(FY,-PeriodID)'...

1.How do I correct this? Keep in mind my FY is dual...

2. Can I put this in a variable for re-use? If so - how would the syntax look like?

Much appreciated.

Labels (2)
1 Solution

Accepted Solutions
rwunderlich
Luminary Alumni
Luminary Alumni

FY = {"$(=firstsortedvalue(FY,-PeriodID))"}

-Rob

View solution in original post

2 Replies
rwunderlich
Luminary Alumni
Luminary Alumni

FY = {"$(=firstsortedvalue(FY,-PeriodID))"}

-Rob

View solution in original post

QFanatic
Creator
Creator
Author

Thanks Rob