Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
Coming your way, the Qlik Data Revolution Virtual Summit. October 27-29. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Partner
Partner

value lists as second dimension based on the first dimension

Hi All,

I am trying to create a value list based on another dimension and I am missing out something. Does any one have an idea on the below.

Load *

inline[

Time period 

MTD

YTD

FY]

I want to create a Vale list for each time period like below.

if(Timeperiod='MTD',valuelist('ACT','TGT','LF','PY'),

if(Timeperiod='YTD',valuelist('ACT','TGT','LF'),

if(Timeperiod='FY',valuelist ('ACT','TGT','LF','RR')))).

Expected output:

MTDACT
MTDTGT
MTDLF
MTDPY
YTDACT
YTDTGT
YTDLF
FYACT
FYTGT
FYLF
FYPY
FYRR

 

Result

MTDMTD
YTDYTD
FYFY
Labels (4)
2 Replies
Highlighted
MVP & Luminary
MVP & Luminary

Why not just loading everything in the script, like:

Load * inline [Time period, ValueListValues

MTDACT
MTDTGT
MTDLF
MTDPY
YTDACT
YTDTGT
YTDLF
FYACT
FYTGT
FYLF
FYPY
FYRR

] (txt, delimiter is \t);

- Marcus

Highlighted
Partner
Partner

yes...That was what i used at first. I had issues with sorting them in order when using a Vizlib pivot table extension.

I figured it out eventually. It works now 🙂 

Thanks for the reply