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: 
brunov86
Contributor II
Contributor II

Set Analysis and Dual Function

Hello,

I run into the same problem for days now and cannot find a solution.

I have 1 KPI which is defined by the following set analysis:

count(distinct {<[Master_LocalFiscalYear]={$(=max([Master_LocalFiscalYear]))},[ClassStatus]={'Registered'},
[FinalStatus]={'Absent','Failed','In-Progress','Passed'}>} [studentid])

This set analysis works wonder when a use my standard calendar year.

In this example it is a special year following the format YYYY/YYYY (LocalFiscal_Year).

As I cannot use a text value (LocalFiscal_Year), I have used a dual function to made all the calculations run on a single year value (LocalFiscal_YearSingle).

Script extract

...

MasterCalendarDateGrantedRC:

LOAD
*,

Calendar_Date as CalendarDateGrantedRC,
Calendar_Year as Master_CalendarYear,
Dual(LocalFiscal_Year,LocalFiscal_YearSingle) as Master_LocalFiscalYear

FROM [$(PEDirectory)Master_Calendar.csv]
(txt, utf8, embedded labels, delimiter is ',');

....

I think the issue is somehow with my dual function but I don't see why.

Any help would be really appreciated.

Thank you,

Bruno

Labels (2)
10 Replies
Vegar
MVP
MVP

😃 glad I could help.