Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago

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 IDCompany Size
1Small
2Small
3Small
4Small
5Medium
6Medium
7Medium
8Large
9Large

 

2021_Customer Table:

Customer IDCompnay Size
1Small
2Small
3Medium
4Medium
5Medium
6Medium
7Large
8Large
9Large

 

Program_Table:

CI NumberProgramYear
1Financial2020
2Financial2020
2Non-Financial2020
3Financial2020
4Financial2020
5Financial2020
5Non-Financial2020
6Financial2020
7Financial2020
7Financial2020
8Financial2020
8Non-Financial2020
1Financial2021
1Non-Financial2021
2Financial2021
3Financial2021
4Financial2021
5Financial2021
6Financial2021
8Financial2021
9Financial2021

Thank you in advance,

Assad

2 Replies

    • V-lianl-msft's avatar
      V-lianl-msft
      Icon for Community Support rankCommunity 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.