Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
dmohanty
Partner - Specialist
Partner - Specialist

How to 'Group By' a Dimension in Straight Table?

Hi All,

I have to display a Straight Table like this below:

   

IDPlantSales by PlantSales by ID
100A50220
100B70220
100C60220
100D40220
200A30190
200B60190
200C80190
200D20190

  • To Calculate the Sales by Plant: I have some formula written in Expressions (for example - SUM(Sales_1) + SUM(Sales_2)) and giving the Correct Results based on Plants.
  • To Calculate the Sales by ID: How can I use the same expression, but has to be GROUP BY the Dimension 'ID' , so that it would display the results like above. It has to Sum of all the Sales for all Plants for that particular ID.

I tried using the AGGR(), like this:  AGGR( SUM(Sales_1) + SUM(Sales_2)  , ID) , but the result is like in this format in the chart. It's not filling up the Cells in the Chart.

DPlantSales by PlantSales by ID
100A50-
100B70-
100C60220
100D40-
200A30-
200B60-
200C80190
200D20-

   

Regards!

1 Solution

Accepted Solutions
ramoncova06
Partner - Specialist III
Partner - Specialist III

your aggr is fine, you just need to add the nodistinct, so it be included on every row

AGGR( nodistinct SUM(Sales_1) + SUM(Sales_2)  , ID)

View solution in original post

3 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

rangesum(sum(total <ID> Sales_1),sum(total <ID> Sales_2))


talk is cheap, supply exceeds demand
ramoncova06
Partner - Specialist III
Partner - Specialist III

your aggr is fine, you just need to add the nodistinct, so it be included on every row

AGGR( nodistinct SUM(Sales_1) + SUM(Sales_2)  , ID)

dmohanty
Partner - Specialist
Partner - Specialist
Author

Thank you very much Gysbert and Ramon!