Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
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
Partner Ambassador/MVP
Partner Ambassador/MVP

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

-Rob

View solution in original post

2 Replies
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

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

-Rob

QFanatic
Creator
Creator
Author

Thanks Rob