Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
smilingjohn
Specialist
Specialist

Selections

Hi All .

Urgent help needed

i have a bar chart it will displays top5 and bottom leads and this is the expression iam using

=IF((Sum

(

  {

    <

    Date= {">=$(StartDate)<=$(EndDate)"},

    Department = P(Dept),

    Brand=

    >

  } If(Leads=Replace(ValueList($(=Cust_LeadRankings__Desc),'',$(=Cust_LeadRankings_Asc)), Chr(11), ''), count)

)) > 0 , 0, 1)  and Level= 1

when i make the selections accordingly i dont see any bar chart , and i take a list box of Brand in which i see the  L  is being selected as shown in the figure

L is selected.PNG

and when i manually deseclt it as shown in the snapshot 2 i see the chart showing proper values .

Both are turned white.PNG

Can someone help how do i edit this above expression so that the Brand shoul be highled in both possible values of Brand L and M.

Thanks in Advance

6 Replies
sunny_talwar

May be this

=IF((Sum({<Date= {">=$(StartDate)<=$(EndDate)"}, Department = P(Dept), Brand=>} If(Only({<Brand>} Leads) = Replace(ValueList($(=Cust_LeadRankings__Desc),'',$(=Cust_LeadRankings_Asc)), Chr(11), ''), Only({<Brand>}count)) )) > 0 , 0, 1)  and Only({<Brand>}Level) = 1

smilingjohn
Specialist
Specialist
Author

Let me try this sunny

Thanks

smilingjohn
Specialist
Specialist
Author

Hi Sunny i tried with your epression it says below error .

Nested if.PNG

sunny_talwar

Can you try just this

=IF((Sum({<Date= {">=$(StartDate)<=$(EndDate)"}, Department = P(Dept), Brand=>} If(Leads = Replace(ValueList($(=Cust_LeadRankings__Desc),'',$(=Cust_LeadRankings_Asc)), Chr(11), ''), count) )) > 0 , 0, 1)  and Only({<Brand>}Level) = 1

smilingjohn
Specialist
Specialist
Author

HI sunny how do i edit the below expression for the same used case

Sum

(

  {

  

    <

  

    Date= {">=$(StartDate)<=$(EndDate)"},

    Department = P(Dept)

    Brand=

    >

  } If(Lead=Replace(ValueList($(=Cust_LeadRankings__Desc),'',$(=Cust_LeadRankings_Asc)), Chr(11), ''), count)

)

it will be great if you can change this one .. the above expression seems to be working fine , but not able to makes changes in this

smilingjohn
Specialist
Specialist
Author

Hi I tried editing the expression in the anohter chart expression ..byt its giving an error like nested if is not allowed , THis is what i edited

=Sum

(

  {

  

    <

  

    Date= {">=$(StartDate)<=$(EndDate)"},

   Department = P(Dept)

    Brand=

    >

  } If(Lead=Replace(ValueList($(=Cust_LeadRankings__Desc),'',$(=Cust_LeadRankings_Asc)), Chr(11), ''),only({<Brand>} count)

)

But this expression is giving nested if is not allowed