Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

drillnaut
Valued Contributor

Expansion works in Master Measure, but not Master Dimension

Hello Folks,

I have a variable that I declare in my script:

SET vPayItemCodeTypes =

'BRKDWN','DET','FLAT','FUELMI','FULTRC',

    'GRNTPA','HDPAY','HOL','HR','LAYOVR','OT','RA-DED',

    'RA-ESC','RA-LOA','REFSIG','STP',

    'TRNPY','TSM','UNLD','VACHRL/PTO HR','TRLMOV',

    'SAFET','MINACC','INCNT1'

;

Then in a Master Measure, I have this and it works as expected.

SUM({<pyt_itemcode={$(vPayItemCodeTypes)}>} pyd_amount)

However, when I try the same thing in a Master Dimension, I have no such luck.

=if( match(pyt_itemcode, '$(vPayItemCodeTypes)', pyt_itemcode

, Null()

)

Nope.

=if( match(pyt_itemcode, $(vPayItemCodeTypes), pyt_itemcode

, Null()

)

No dice.

Does anyone know how I can get my variable to expand properly?

Any help is greatly appreciated.

1 Solution

Accepted Solutions
drillnaut
Valued Contributor

Re: Expansion works in Master Measure, but not Master Dimension

I'm an idiot.  I was lacking a closing parenthesis.


=if( match(pyt_itemcode, $(vPayItemCodeTypes)), pyt_itemcode  ,Null()  )

1 Reply
drillnaut
Valued Contributor

Re: Expansion works in Master Measure, but not Master Dimension

I'm an idiot.  I was lacking a closing parenthesis.


=if( match(pyt_itemcode, $(vPayItemCodeTypes)), pyt_itemcode  ,Null()  )