Skip to main content
Announcements
Customer Spotlight: Discover what’s possible with embedded analytics Oct. 16 at 10:00 AM ET: REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
rajaqliks
Contributor III
Contributor III

Pivot table totals showing wrong

Hi Folks,

I have created one pivot table, values are showing correct, but totals are not showing correct values , for reference purpose i am adding QVW .

Thanks in advance

2 Solutions

Accepted Solutions
tresesco
MVP
MVP

You can try putting an aggregation function around your expression in pivot expression like:

Sum( Aggr ( If(.....) , Contact_Type, WEEKEND))

View solution in original post

gn_marvs1989
Contributor III
Contributor III

Try this; You need to use the Aggr()

sum(aggr( if(GetFieldSelections(MDESC)='TargetOnly',count({=' & Date(Max(WEEKEND) - 77, 'MM/DD/YYYY') & '<=' & Date(Max(WEEKEND), 'MM/DD/YYYY'))"},RightfulOwner={'Y'},TargetFlag={'1'}>}DISTINCT Key), if(GetFieldSelections(MDESC)='Total Territory',count({=' & Date(Max(WEEKEND) - 77, 'MM/DD/YYYY') & '<=' & Date(Max(WEEKEND), 'MM/DD/YYYY'))"},RightfulOwner={'Y'}>}DISTINCT Key), if(GetFieldSelections(MDESC)='Full Universe',count({=' & Date(Max(WEEKEND) - 77, 'MM/DD/YYYY') & '<=' & Date(Max(WEEKEND), 'MM/DD/YYYY'))"}>}DISTINCT Key)))) ,WEEKEND,Contact_Type))

View solution in original post

10 Replies
gn_marvs1989
Contributor III
Contributor III

Would this be the solution you need? see attachment

rajaqliks
Contributor III
Contributor III
Author

same error, i didn't get the solution

in qvw we have two chart one is bar and second one is pivot table bar graph is showing correct values but the pivot table is not show the correct values in totals please check and help me

rajaqliks
Contributor III
Contributor III
Author

compare the values with bar graph chart

tresesco
MVP
MVP

You can try putting an aggregation function around your expression in pivot expression like:

Sum( Aggr ( If(.....) , Contact_Type, WEEKEND))

tresesco
MVP
MVP

You can try putting an aggregation function around your expression in pivot expression like:

Sum( Aggr ( If(.....) , Contact_Type, WEEKEND))

rajaqliks
Contributor III
Contributor III
Author

Thank you very much Tresesco its working great

gn_marvs1989
Contributor III
Contributor III

Try this; You need to use the Aggr()

sum(aggr( if(GetFieldSelections(MDESC)='TargetOnly',count({=' & Date(Max(WEEKEND) - 77, 'MM/DD/YYYY') & '<=' & Date(Max(WEEKEND), 'MM/DD/YYYY'))"},RightfulOwner={'Y'},TargetFlag={'1'}>}DISTINCT Key), if(GetFieldSelections(MDESC)='Total Territory',count({=' & Date(Max(WEEKEND) - 77, 'MM/DD/YYYY') & '<=' & Date(Max(WEEKEND), 'MM/DD/YYYY'))"},RightfulOwner={'Y'}>}DISTINCT Key), if(GetFieldSelections(MDESC)='Full Universe',count({=' & Date(Max(WEEKEND) - 77, 'MM/DD/YYYY') & '<=' & Date(Max(WEEKEND), 'MM/DD/YYYY'))"}>}DISTINCT Key)))) ,WEEKEND,Contact_Type))

rajaqliks
Contributor III
Contributor III
Author

Hi totals are working fine but Weekly avg and totals are not working could you please help me on that,

i am adding qvw for reference.

 

 

rajaqliks
Contributor III
Contributor III
Author

Here is the qvw