Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

priya945
New Contributor III

Show a Table

Hi All,

I have below data

   

EmpCountryRegionMonthSales
RamIndiaAPACJan200
RajUKEuropeJan100
RamIndiaAPACFeb300

Created a pivot table as below

 

APAC
EmpJanFeb
Ram200300

When clicking on APAC then  need to show country values (dynamically) in same table

   

APACIndia
EmpJanFebJanFeb
Ram200300200300

Thanks In advance,

Priya

10 Replies
neelamsaroha157
Valued Contributor II

Re: Show a Table

Create a drill down down group and use the drill down group in dimension.

priya945
New Contributor III

Re: Show a Table

HI Neelam

I need to display the column(India) dynamically when user selects on APAC


Thanks

priya945
New Contributor III

Re: Show a Table

Hi,

I have managed to show the expression dynamically using GetFieldSelections function.

But the requirement is to show below

Now the field Country contains only India as Region and if China is added later then instead of writing the expression manually for each region, can we write one expression that dynamically read the values from the field Region to form the expression for each region

Can this be done in UI or Load script?

Thanks ALL.

priya945
New Contributor III

Re: Show a Table

H All,

Any suggestion please?

Regards,

Priya

neelamsaroha157
Valued Contributor II

Re: Show a Table

For the output like your last table, what I would do is - Use EMP and Country as dimension in a pivot table and use set analysis for 'APAC'. Something like Sum({<Region = {'APAC'}>}Sales).

it would be more helpful if you can share a sample qv file.

neelamsaroha157
Valued Contributor II

Re: Show a Table

Check this out.

You can play play around the 'Total' display depending on how you want it.

You can also use the below expression if you are looking to make changes only for APAC-

=If(GetFieldSelections(Region)= 'APAC', 'APAC', 'TOTAL')

priya945
New Contributor III

Re: Show a Table

Thank you Neelam for the suggestion.

I agree with the expression if user select on APAC, below expression works.

=GetFieldSelections(Region)= 'APAC'

But Region Listbox has APAC, EUROPE, USA...and when user makes a selection on the Region ListBox(EUROPE/USA) then Pivot table has show the countries belongs to dynamically

I think a variable to read the user input may help. please suggest

neelamsaroha157
Valued Contributor II

Re: Show a Table

Hi Priya,

Thanks exactly what is QVW is doing.

Can you specifically tell me whats not working in the attachment?

priya945
New Contributor III

Re: Show a Table

Thank you Neelam .

Finally i achieved the output

Community Browser