Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
upaliwije
Creator II
Creator II

Set expression

Hi Friends

I have written a set expression in my QV doc

SUM({<BCOD={$(CMB)},(Cmb_Sector)* $>}(ACTUAL))

The above is not working. my CMB Variable is defined  match(BCOD,'NU00','HL00')

Cmb_Sector is an Alternate state. Pls help me to correct the above

6 Replies
sushil353
Master II
Master II

Hi,

what are you trying to do with ,(Cmb_Sector)* $

Try this:

SUM({<BCOD={'$(CMB)'}>} ACTUAL)

upaliwije
Creator II
Creator II
Author

SUM({(Cmb_Sector)* $}(ACTUAL))

The above is my original set analysis with Cmb_Sector as Alternate state and It is working properly. Now I want insert a variable CMB=match(BCOD,'NU00','HL00'). Then It does not work. Even your Expression  SUM({<BCOD={'$(CMB)'}>} ACTUAL) is not working.

Is there any this wrong with my variable?

Anil_Babu_Samineni

I am also not entirely sure

But, You can try similar this way and then try or Check Sushil reply and then see after that describe more if issue is still there


sum({$<BCOD= {'$(CMD)'}::[Cmb_Sector] >} ACTUAL)

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
sushil353
Master II
Master II

This is because you are referencing the same two variables, which are affected by the selections in the default state.


try to calculate a another variable CMB2 = match({Cmb_Sector} BCOD,'NU00','HL00')


SUM({<BCOD={'$(CMB2)'},(Cmb_Sector)* $>} ACTUAL)



upaliwije
Creator II
Creator II
Author

Thanks for the help of both of you. But none of the Expression is working. I simplified it as below. Still not working

SUM({<BCOD={"NA00"},(Cmb_Sector)* $>}(ACTUAL))

upaliwije
Creator II
Creator II
Author

I am attaching herewith a sample QV document for Alternate State and kindly have a look at IT . I my pivot table there I want to show following infomation

in ALL  Column  total of sales as shown there and is correct

    G1 Column Sales Relating to GI Depeartments

G2 Column Sales Relating to G2 Depeartments 


But in Column G1 and G@ no data is shown


Pls help