Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
KumaRan
Contributor III
Contributor III

Cumulative with two dimension

HI  all,

I am trying to create a cumulative bar chart for two dimension. Here i have taken brand and day as dimension.Sales as measure

say for example brand A &Brand B for 10 days.

Brand A doesn't have transaction on Day 5. actually 

Day      sales   Cumulative                                                                       Day      sales   Cumulative                                                                             1             1             1                                                                                          1             1             1

2              2           3                                                                                          2              2           3

3              3           6                                                                                         3              3           6 

4             4           10                          Required O/P   --->                        4             4           10

6             6           16                                                                                        5           0              10

7             7           23                                                                                        6             6           16   

8            8             31                                                                                        7             7           23

 

sample data and application attached here.

Thanks in anticipation

15 Replies
KumaRan
Contributor III
Contributor III
Author

Thanks for your response. But unfortunately it is not working for me.As u said i don't have each and every combination of Brand and day .
Can you help me how to make each combination of brand and day?
sunny_talwar

All you might need to do is this (can be very expensive) 

TempTable:
LOAD DISTINCT Brand
Resident Table;

Join (TempTable)
LOAD DISTINCT Day
Resident Table;

Once you create a new table where you create a Cartesian join between Brand and Day, you can then concatenate it to your main table

Concatenate (Table)
LOAD Brand,
 Day
Resident TempTable;

 

KumaRan
Contributor III
Contributor III
Author

Thanks for your suggestion.

Its working fine

KumaRan
Contributor III
Contributor III
Author

Hi ,

The solution which you have provided is working fine if both fields (Brand &Day) are in same table. But In my case fields(Brands & Day) are in different table.  so i   cant able to get the desired output?

Can you suggest me.?

Thanks in anticipation

 

KumaRan
Contributor III
Contributor III
Author

Hi ,

The solution which you have provided is working fine if both fields (Brand &Day) are in same table. But In my case fields(Brands & Day) are in different table. so i cant able to get the desired output?
Can you suggest me.?

Thanks in anticipation
sunny_talwar

I guess for this to work, you would need to bring them into a single table... may be using a link table?