Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hello, What I am trying to achieve is to have a visualization that looks like this:
On my table visualization I will insert the Company Column and count the CustomersID so I can know that in 2018 I had that amount of Customers. On the other column I will have the same result but for 2019, so far so good.
But what happens is that each year is from a different table, and the Customer ID that I had on 2018 might not be on 2019 anymore, if he/she cancelled the service. The same way I have Customers in 2019 that didn't exist in 2018, that means that not all Customers ID exists on both tables.
I created a 1:1 relationship using CustomerID so I could relate the tables. But when I create the visualization like the image above, the results from one of the Count columns shows the wrong values. If I use the 'Company' column from 2018 the 2019 column shows the wrong, when the 'Company' column is from 2019, the 2018 count column shows the wrong values.
In my understanding that happens because when I use the column 'Company' from 2019, PowerBI will only use the Customer IDs that belongs to the 2019 table, so 2018 table will have IDs missing.
When I do DISTINCTCOUNT('2019'[CustomersID]) - DISTINCTCOUNT('2018'[CustomersID]) and try to show the result on the visualization like the image below, the same problem will happen.
How can I get around that problem? Thanks in advance for all the help!
(The image above shows what I wanted, the subtraction of the results)
If two tables have the same structure the append them.
https://radacad.com/append-vs-merge-in-power-bi-and-power-query
Before that add date column as year start or end date. If you do not have one.
Else create a common company and customer dim
company = distinct(union(all(T2018[company),all(T2019[company))
Join it with both the tables.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 40 | |
| 35 | |
| 34 | |
| 31 | |
| 28 |
| User | Count |
|---|---|
| 136 | |
| 102 | |
| 68 | |
| 66 | |
| 58 |