Quantcast
Channel: Desktop topics
Viewing all articles
Browse latest Browse all 213819

compare columns in two tables, differ the unique values

$
0
0

I'd like to compare two tables:

Table1 contains all IDs

 

ID
1
2
3
4
5
6
7
8
9
10
11
12

 

Table 2: records only the IDs which purchase by month

ID  SalesAmount  Month
3  100  1
5  200  1
6  300  1
12  100  1
5  700  2
6  500  2
10  230  3
7  100  3

 

I'd like to create the visuals as: 

 

A- slicer:

Month
1
2
3

 If month "2" is marked, 

 

there will be:

- either 2 tables: one with the IDs having sales, another ID with no sale within that month

IDSalesAmount
3100
5200
6300
12100

 

 

ID
1
2
4
7
8
9
10
11

 

Or: one completed table:

ID  SalesAmount
1  0
2  0
3  100
4  0
5  200
6  300
7  0
8  0
9  0
10  0
11  0
12  100

 

I am grateful very much for your insights on how to solve it.

 

With kind regards,

 


Viewing all articles
Browse latest Browse all 213819

Trending Articles