Forum Discussion
Need a help with combining data from two not-connected tables.
Hello,
I am a new user of Power BI. Can you please help me with the following question?
I have two customer tables with unique values. One has customer data of 2020 and the other has 2021. They are connected to the Program table. The program table consists of both 2020 and 2021 data. Customer tables are connected to the Program table but not connected with each other
I want to write a DAX measure or Column that can filter data (Like company Size) from both years. My aim is to find the total number of companies in both years and then apply a year filter. As both customer tables are not connected, so I am having difficulty combining them. would you advise me a way around?
2020 _Cusotmer _Table
| Customer ID | Company Size |
| 1 | Small |
| 2 | Small |
| 3 | Small |
| 4 | Small |
| 5 | Medium |
| 6 | Medium |
| 7 | Medium |
| 8 | Large |
| 9 | Large |
2021_Customer Table:
| Customer ID | Compnay Size |
| 1 | Small |
| 2 | Small |
| 3 | Medium |
| 4 | Medium |
| 5 | Medium |
| 6 | Medium |
| 7 | Large |
| 8 | Large |
| 9 | Large |
Program_Table:
| CI Number | Program | Year |
| 1 | Financial | 2020 |
| 2 | Financial | 2020 |
| 2 | Non-Financial | 2020 |
| 3 | Financial | 2020 |
| 4 | Financial | 2020 |
| 5 | Financial | 2020 |
| 5 | Non-Financial | 2020 |
| 6 | Financial | 2020 |
| 7 | Financial | 2020 |
| 7 | Financial | 2020 |
| 8 | Financial | 2020 |
| 8 | Non-Financial | 2020 |
| 1 | Financial | 2021 |
| 1 | Non-Financial | 2021 |
| 2 | Financial | 2021 |
| 3 | Financial | 2021 |
| 4 | Financial | 2021 |
| 5 | Financial | 2021 |
| 6 | Financial | 2021 |
| 8 | Financial | 2021 |
| 9 | Financial | 2021 |
Thank you in advance,
Assad
2 Replies
- AnonymousNot applicable
- V-lianl-msft
Community Support
Hi Anonymous ,
I'm not sure what you're looking for. If you're just counting customers every year, try using the year slicer and create the following measure:
Measure = DISTINCTCOUNT(Program_Table[CI Number])If you misunderstand your thought, please describe the result you want with pictures or calculation steps based on the dataset you provided.
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.