Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

zhaohaifeng
New Contributor III

Concern regarding straight table and pivot table

Hi Guys,

 

Please help to  check our challenge as below.

Now our dimension was like 

Pick(match(
GetFieldSelections(Filter),'A','B','C'
),
FieldAA,FieldAB,FieldAC
)

And Measure was like 

Pick(match(getfieldselection(Filter),'A','B','C'),sum(Avalue),sum(Bvalue),sum(Cvalue)).

The field AA and AB are in the data model, AC not association with the data model as the new CR, so we dont want do the change for current data model, but for the case, once we used the straight table, it works fine, but for pivot table, the value was not correct, once we add data model Dimension in pivot table, then its correct. So Any one can share some experience for the case?  Thanks.

 

Best Regards,

Haifeng

Labels (1)
1 Solution

Accepted Solutions

Re: Concern regarding straight table and pivot table

Change your pivot table dimension to this

=$(='[' & Pick(Match(GetFieldSelections(Filter), 'A', 'B', 'C'), 'AA', 'AB', 'AC') & ']')

image.png

7 Replies

Re: Concern regarding straight table and pivot table

Would you be able to share a sample where we can see the issue?

zhaohaifeng
New Contributor III

Re: Concern regarding straight table and pivot table

Thanks Very much.

 

Shared the sample file for your reference. Thanks.

 

Best Regards,

Haifeng

Re: Concern regarding straight table and pivot table

You mentioned in your initial post that it works in Straight table, but not in Pivot table.... but in your sample it seems to be not working for either of them. Is that correct or am I missing something here?

image.png

Highlighted
zhaohaifeng
New Contributor III

Re: Concern regarding straight table and pivot table

No, you can filter the Filter, then you can see the case, Straight table was correct but pivot table now.

Filter.PNG

Re: Concern regarding straight table and pivot table

Change your pivot table dimension to this

=$(='[' & Pick(Match(GetFieldSelections(Filter), 'A', 'B', 'C'), 'AA', 'AB', 'AC') & ']')

image.png

zhaohaifeng
New Contributor III

Re: Concern regarding straight table and pivot table

Great! Works now! Thanks very much.

 

But Could you help to explain why you used the dimension above?  Can you help to explain and let us know the reason. Thanks.

 

Best Regards,

Haifeng

zhaohaifeng
New Contributor III

Re: Concern regarding straight table and pivot table

Thanks very much. But can you help to explain the reason? whats the difference between them? Thanks. Best Regards, Haifeng