Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

list of years and companies are need to pass the dynamically on Calculation Condition at table properties


Hi

We are generating reports company wise for a perticulare year. That's why i have taken all the years in one list box and all the companies  on another list box. for example if you want to see MDP company data for 2012 Then we can select a year and company from list box it should be represent in to the table chart.

intially we cannot see any data on the report untill/unless you select the year and company from list box  That's why i have added condition at Calculation Condition on table properties and add a comment on error meesage Like " Please select atleast one company and Year form list box"

This expressionis is working now ( YEAR = 2013 OR YEAR = 2014 OR YEAR = 2015 OR YEAR = 2016 OR YEAR = 2017 OR YEAR 2018) AND (COMPANY = 'MDP' OR COMPANY = 'COKY')

Here My problem is if any year or companies are added in feature Then i have add the manaually then redeply So That I am planning to pass the year and company's through variables.

Can you please suggest to us. How can we create a variables for year and company? & How can we pass the expression at calcualted condition on table properties in  qlik view

1 Solution

Accepted Solutions
lironbaram
Partner - Master III
Partner - Master III

why not use in the calculation condition this formula

getselectedcount(YEAR)>0 and getselctedcount(COMPANY)>0

this is if you allow multiple selection in the field

if you want exactly one value in each field use this

getselectedcount(YEAR)=1 and getselctedcount(COMPANY)=1

View solution in original post

2 Replies
lironbaram
Partner - Master III
Partner - Master III

why not use in the calculation condition this formula

getselectedcount(YEAR)>0 and getselctedcount(COMPANY)>0

this is if you allow multiple selection in the field

if you want exactly one value in each field use this

getselectedcount(YEAR)=1 and getselctedcount(COMPANY)=1

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

HI,

     Kindly share some sample qvw file for more understanding.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!