Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
tommyl
Creator
Creator

Pivot Table Grouping for only existent values

Hello experts,

I need your help about below issue:

My data is like:

companyfileNameactivityTypeorderSumcampaignSum
A1F1C11050
A2F2C21432
A3F3C32267
A4F4C4158
A3F3C3204

 

I want to create a pivot table with:

  • dimensions:
    • company,
    • fileName
    • activityType
  • measures:
    • sum(aggr(sum(orderSum),company,fileName,activityType)
    • sum(aggr(sum(campaignSum),company,fileName,activityType)

But the result is far ahead of my need as:

For Company A the result is as attached

 

(Same for the other Companies with related sums)

But what i need is : 

companyfileNameactivityTypeorderSumcampaignSum
A1F1C11050
A2F2C21432
A3F3C34271
A4F4C4158

 

I dont want zero valued unnecassry, notrelated rows to be displayed. Could you please help me how to do this? 

Thank you,

Regards,

Tommy

Labels (1)
1 Solution

Accepted Solutions
sunny_talwar

It seems more of a data model issue to me...

View solution in original post

11 Replies
TimvB
Creator II
Creator II

The desired table as you described is a straight table instead of a pivot table. You should add the following to the straight table:

  • Dimensions:
    • Company,
    • FileName
    • ActivityType
  • Measures:
    • sum(OrderSum)
    • sum(CampaignSum)

Hope it helps!

tommyl
Creator
Creator
Author

Hello Tim,

Thank you for the response. I need to display data in groupings in case a company may have more than one fileName and activitycode.

Sorry my bad not to mention that, so straight table's not working in groupings i think. 

Thank you

Tommy

TimvB
Creator II
Creator II

Hi Tommy, 

A straight table might still be an option for you if you have grouped data, but this depends on the tasks and preferences of the final users. I provided a QVF (attached) and a screenshot with some examples how you can visualize your data in a (pivot) table without having null values. I hope you get some inspiration.

Tim

 

Pivot options.PNG

tommyl
Creator
Creator
Author

Hello,

Thank you, i did it like that but the problem is, pivot displays every activitycode and filename for each partner, recurrently. I mean regardless of the filename or activitycode belongs or not belong to that partner. Do you have a clue?

Regards,

 

 

sunny_talwar

Did you try to uncheck 'Include zero values' under Add-ons -> Data handling

tommyl
Creator
Creator
Author

Hello,

I saw that in one of your replies, and applied but it only hides zero valued totals.

Regards,

sunny_talwar

Can you show an image with and without 'Include zero values' to show what you get? And point out what the goal is?

tommyl
Creator
Creator
Author

Hello,

Zero values are ommitted. It is ok but there is a situation of multiplication of data for each partner:

mult.JPG

Sorry for the renamings(NDA),

Partner 2 has no file1 and no activity1 actually. Only partner1 has file1 and activity1. but in pivot it seems asif it has. 

Regards,

sunny_talwar

It seems more of a data model issue to me...