Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

piyush_s11
Contributor

Required urgent help to fix the Formula in Qlikview

Hi,

I have two pivot tables in named by continent & by plant. When I should select a plant from filter, in the continent table it should give me result for respected continent along with description. For example : If I select a plant Shanghai Cutting then Continent table should give me the values for Asia region not only for Shanghai Plant.

Similarly, in the plant table, it should give only plant related information regardless of Continent.

Please find attached reference file for your reference.

Thanks in advance.

2 Solutions

Accepted Solutions
prabir_c
New Contributor III

Re: Required urgent help to fix the Formula in Qlikview

Hi Piyush,

Use p function to get possible value.

Use this expression in your first chart

=Sum({<FieldID={'400','413','449'},[Month] ={"<=$(=GetFieldSelections([Month]))"},Continent= p(Continent),[Plant Name]= >}Actual)

in the plant table, it should give only plant related information regardless of Continent. (Clarify)

prabir_c
New Contributor III

Re: Required urgent help to fix the Formula in Qlikview

Hi Piyush,

We use p function to get possible values of a field. You can only use p() in a set analysis set modifier.

when you are selecting Plant Name 'Shanghai Cutting', It will return Continent Asia. I am just picking that Continent data using p function regardless whatever plant is selected. And bypassing the Plant name will generate full data set of that Continent.

for better understanding follow this post: https://community.qlik.com/t5/QlikView-App-Development/P-E-and-where-do-you-use-them/td-p/457847.

For Plant, it should give me information related to plant regardless whatever continent is selected.

Bypass Plant Name in your second chart like this-

sum({<FieldID={'400','413','449'},[Month] ={"<=$(=GetFieldSelections([Month]))"},Continent=>}Actual)

what we select in Continent Field it will not effect second chart.

Please make it correct answer if it is working. 🙂

 

6 Replies
Shubham_Deshmukh
Valued Contributor

Re: Required urgent help to fix the Formula in Qlikview

Hi Piyush,

Just check your data model, Qlikview has associative model functionality. So if you have continents along with your plants in the data itself, then it will definitely works on both tables.

 

-Shubham

prabir_c
New Contributor III

Re: Required urgent help to fix the Formula in Qlikview

Hi Piyush,

Use p function to get possible value.

Use this expression in your first chart

=Sum({<FieldID={'400','413','449'},[Month] ={"<=$(=GetFieldSelections([Month]))"},Continent= p(Continent),[Plant Name]= >}Actual)

in the plant table, it should give only plant related information regardless of Continent. (Clarify)

Highlighted
piyush_s11
Contributor

Re: Required urgent help to fix the Formula in Qlikview

Hi Prabir_c,

Thanks for quick reply.

For Plant, it should give me information related to plant regardless whatever continent is selected.

Also could you please let me know what will p() function 

Thanks.

 

prabir_c
New Contributor III

Re: Required urgent help to fix the Formula in Qlikview

Hi Piyush,

We use p function to get possible values of a field. You can only use p() in a set analysis set modifier.

when you are selecting Plant Name 'Shanghai Cutting', It will return Continent Asia. I am just picking that Continent data using p function regardless whatever plant is selected. And bypassing the Plant name will generate full data set of that Continent.

for better understanding follow this post: https://community.qlik.com/t5/QlikView-App-Development/P-E-and-where-do-you-use-them/td-p/457847.

For Plant, it should give me information related to plant regardless whatever continent is selected.

Bypass Plant Name in your second chart like this-

sum({<FieldID={'400','413','449'},[Month] ={"<=$(=GetFieldSelections([Month]))"},Continent=>}Actual)

what we select in Continent Field it will not effect second chart.

Please make it correct answer if it is working. 🙂

 

piyush_s11
Contributor

Re: Required urgent help to fix the Formula in Qlikview

Hi Prabir_c

Could you please also help me for the post subjected "Month name from January to December " posted couple of days back.

Thanks

piyush_s11
Contributor

Re: Required urgent help to fix the Formula in Qlikview

Hi Prabir_c,

Could you please look into my issue posted with title " Help required for Filter "

Thanks in advance