Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
sindhura
Contributor II
Contributor II

Comparing the values of two drill down groups in a if condition

Hi,

I have two different sets of dates groups, namely G1 and G2. wherein these includes years, Months and Dates.

G1 (years)          G2(years)

2007                2009

2008                2010

.                     .

.                     .

2015              2015

According to my requirement I should display G1 as a filter in the dashboard and

some of my sheet objects(bar charts) uses G1  drilldown group as  a dimension.

and one of my sheetobj(bar chart) requires G2 drill down group as a dimension.

But I need to display only Y1group's year as a filter and need to filter based on selections on G1"s year.

I tried with giving G1 drill down group as dimension and used conditional enable option by giving expression as

= if (GetCurrentField([G1]) <> GetCurrentField(G2]),[G2)

but it doesnt helps.

kindly suggest me

and could you please tell me what are the possible reasons that might lead to duplicate values in the report?????

4 Replies
Gysbert_Wassenaar

Try changing the expressions in the second chart that uses G2. For example sum(Amount) would become sum({<G1_Year=,G1_Month=,G1_Date=, G2_Year=P(G1_Year), G2_Month=P(G1_Month),G2_Date=P(G1_Date)>}Amount)

To make things easier you could create a variable vSet as {<G1_Year=,G1_Month=,G1_Date=, G2_Year=P(G1_Year), G2_Month=P(G1_Month),G2_Date=P(G1_Date)>}. And change the expressions to use that variable: sum( $(vSet) Amount)


talk is cheap, supply exceeds demand
sindhura
Contributor II
Contributor II
Author

{<G1_Year=,G1_Month=,G1_Date=, G2_Year=P(G1_Year), G2_Month=P(G1_Month),G2_Date=P(G1_Date)>}.

In this expresssion G1_year means

can I use as Year field in G1 rightaway or the Groupname?


sindhura
Contributor II
Contributor II
Author

{<G1_Year=,G1_Month=,G1_Date=, G2_Year=P(G1_Year), G2_Month=P(G1_Month),G2_Date=P(G1_Date)>}.

In this expresssion G1_year means

can I use as Year field in G1 rightaway or the Groupname?

sindhura
Contributor II
Contributor II
Author

Thanks for the reply. The answer you gave works with another chart that will be placed in another sheet.

I need to implement in the first chart and I have to use G1 group for interaction but the chart has to calculate based upon G2 group