Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
zhaohaifeng
Contributor III
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
sunny_talwar

Change your pivot table dimension to this

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

image.png

View solution in original post

7 Replies
sunny_talwar

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

zhaohaifeng
Contributor III
Contributor III
Author

Thanks Very much.

 

Shared the sample file for your reference. Thanks.

 

Best Regards,

Haifeng

sunny_talwar

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

zhaohaifeng
Contributor III
Contributor III
Author

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

Filter.PNG

sunny_talwar

Change your pivot table dimension to this

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

image.png

zhaohaifeng
Contributor III
Contributor III
Author

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
Contributor III
Contributor III
Author

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