Skip to main content
Announcements
Customer Spotlight: Discover what’s possible with embedded analytics Oct. 16 at 10:00 AM ET: REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
nikhilgarg
Specialist II
Specialist II

Set analysis prob

Hey,

I want to use 2 different states in my expression. My scenario is:

Year : Inherited State

Month : Inherited State

GLDesc : State1

I have line chart with exp:

a:  Sum({State1<KPI = {'MktExpse'}>}Value) as Expenses

b:  Sum(Value1) as Sales

Now when i select any year or month, Expenses does not change untill i select any value from GLDesc.

I want Expenses expression to change for Year and Month Selection as well.

Thanks,

Nikhil

15 Replies
PrashantSangle

Hi,

try without using State1 in your expression.

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
PradeepReddy
Specialist II
Specialist II

try something like this...

Sum({State1<KPI = {'MktExpse'},Year=$::Year,Month=$::Month>}Value)

nikhilgarg
Specialist II
Specialist II
Author

Hey,

If i dont use State1 then i will not be able to bifurcate expenses GLDesc wise. I have to use State1.

Can i use another state as well in same expression for Year and Month?

nikhilgarg
Specialist II
Specialist II
Author

Hey,

This is also not working

On 06-Jan-2016 12:26 PM, "pradeep taniparthy" <qcwebmaster@qlikview.com>

Kushal_Chawda

try this

Sum({State1*$<KPI = {'MktExpse'},Year=$::Year,Month=$::Month>}Value)

MayilVahanan

Hi

Try like this

Sum({State1<KPI = {'MktExpse'},Year=$::Year,Month=$::Month>}Value)


Edit: Can you able to post the sample.. The above expression works fine for me.

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Not applicable

Hi Nikhil,

This approach should give you what you looking for

sum({State1<KPI={'Exp'},Year={$(=concat(DISTINCT chr(39) & Year & chr(39),',') )},Month={$(=concat(DISTINCT chr(39) & Month & chr(39),',') )}>}Value)

Not applicable

MayilVahanan

Please talk me through your approach. I have never seen this before and this is quite a brilliant way to achieve the desired output.

Thanks,

Byron

MayilVahanan

Hi Bryon,

This is the  general syntax for include the default state in our expression.

Please refer the attached document.. Or I will upload the sample qv document soon.

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.