Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
paulyeo11
Master
Master

How to make my expression change depend on my diamension selection ?

HI All

My expression depend on diamension as below :-

when diamension = GROUP_CLASS =[Pls select 1st Dim]

money

(

sum({$<year = {$(=max(year))}, month = {"<=$(=max({<year={$(=max(year))}>} month))"}>} sales/$(Columndim89)/1000)

-

sum({$<year = {$(=max(year))}, month = {"<=$(=max({<year={$(=max(year))}>} month))"}>} cost/$(Columndim89)/1000)

 

-

sum({$<year = {$(=max(year))}, month = {"<=$(=max({<year={$(=max(year))}>} month))"},GROUP_CLASS=p(GROUP_CLASS)>}Exp/$(Columndim89)/1000)

, $(vMoneyFormatK))

When diamension= BRAND =[Pls select 1st Dim]

money

(

sum({$<year = {$(=max(year))}, month = {"<=$(=max({<year={$(=max(year))}>} month))"}>} sales/$(Columndim89)/1000)

-

sum({$<year = {$(=max(year))}, month = {"<=$(=max({<year={$(=max(year))}>} month))"}>} cost/$(Columndim89)/1000) 

-

sum({$<year = {$(=max(year))}, month = {"<=$(=max({<year={$(=max(year))}>} month))"}>}Exp/$(Columndim89)/1000)

, $(vMoneyFormatK))

My question is it is possible to dynamic change depend on what i select ? so that i can achieve this with one table.

Paul

3 Replies
paulyeo11
Master
Master
Author

Enclosed my qv doc

luciancotea
Specialist
Specialist

=if( $(=GetCurrentField(GROUP_NAME)) = 'GROUP_CLASS'

       , .....

       , .....

   )

paulyeo11
Master
Master
Author

Hi Lucian, thank you very much for yr sharing.

i get null value when i try below expression :-

=if( $(=GetCurrentField([Pls select 1st Dim])) = 'GROUP_CLASS'

       ,

       (

sum({$<year = {$(=max(year))}, month = {"<=$(=max({<year={$(=max(year))}>} month))"}>} sales/$(Columndim89)/1000)

-

sum({$<year = {$(=max(year))}, month = {"<=$(=max({<year={$(=max(year))}>} month))"}>} cost/$(Columndim89)/1000)

-

sum({$<year = {$(=max(year))}, month = {"<=$(=max({<year={$(=max(year))}>} month))"},GROUP_CLASS=p(GROUP_CLASS)>}Exp/$(Columndim89)/1000)

)

       ,

      

       (

sum({$<year = {$(=max(year))}, month = {"<=$(=max({<year={$(=max(year))}>} month))"}>} sales/$(Columndim89)/1000)

-

sum({$<year = {$(=max(year))}, month = {"<=$(=max({<year={$(=max(year))}>} month))"}>} cost/$(Columndim89)/1000)

-

sum({$<year = {$(=max(year))}, month = {"<=$(=max({<year={$(=max(year))}>} month))"}>}Exp/$(Columndim89)/1000)

)

   )