Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
AdrianS1
Contributor III
Contributor III

Changing dimension on chart by buttons

Hi guys, I have a chart like this:

AdrianS1_0-1686921360469.png

dimension=1 and two measures  like this:

Count({<Store={'4'},FLAG_FREE_={0}>} distinct SALES_DOCUMENT)
/ Count(total <1> {<STORE={'4'},FLAG_FREE_={1,0}>} distinct SALES_DOCUMENT)

 

I want to have a 3 buttons with WTD,MTD,YTD and a Chart.

In my data model I have a table with  3 column WTD,MTD,YTD (values 1,0 if we have actual week then in column WTD =1)

If I click on button WTD the dimension on chart will change to WTD and value% will be WTD, etc for MTD AND YTD, but 

I want to have the view  also on the same chart with all data (all time). How I do this ?

 

Labels (4)
1 Reply
Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi Adrian,

In a nutshell, you need to make your calculations dynamic with the use of variables and $-sign expansions. In a variable, you could check which button was pressed (pressing a button would modify one of the variables' values) and build your formula accordingly.

If this sounds too complex, perhaps you may need to engage an experienced developer to do it for you.

Come to the Masters Summit for Qlik to learn advanced development techniques, including the use of variables, $-sign expansions, Set Analysis, AGGR() and more.

Cheers,