Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi all,
I was hoping someone could help me.
I have two data sets that I am trying to link together and visualise within a matrix table.
I have source A Sales records from one company. Source B contains sales records from another company.
Information:
Source A:
Source B:
Source C:
Contains the address of each sales location and brings in each unique ID. So 123 downtown would be equal to A10, within source A and B50 within Source B.
I have created a relationship between source A and B by using the unique ID’s within Source C. Each relationship is one to many with a cross filtering direction of both
I have created the matrix visual using:
The problem I am having is that when I bring in source B sales total from each Quarter I am getting the high level total and not the low level total for that quarter.
If I also bring in the End date form source B I get more rows that when summed do not add up to the whole total
I assumed this was relationship issue but it seems as though my model get confused by all the different dates.
It should be able to see that 28/2/2017 from source B should fall within the same quarter as 31/3/2017 from source A but it doesn’t
The matrix visual should look smoothing like this:
Year (A) Quarter (A) Unique ID A Unique ID B Total Sales A Total Sales B
2017 Qtr 1 A20 B45 100,000 200,000
Does anyone have any ideas why it reacts like this and how to fix it?
Thanks for the help,
Boycie92
Solved! Go to Solution.
Hi all,
In case anyone else has a similar problem I have found a solution. However it’s not very elegant.
Solution:
From there I was able to get the desired layout and correct figures.
Thanks,
Boycie92
Hi,
Please share the link from where i can download your 3 datasets
Hi @v-huizhn-msft and @Ashish_Mathur
The following link will take you to an example i have created:
https://www.dropbox.com/s/nb0pv07lpqpf2ag/New%20Compressed%20%28zipped%29%20Folder.zip?dl=0
Example 1 Is my current layout and problem
For Example, Total A should be 1,90,000 and Total B should be 334,500 but if I export the data as a CSV file Total A is 5,260,000 and Total B is 599,000
Example 2 is @v-huizhn-msft solution. I have created a calendar table and linked it to the Source A End Date and I still get the same results as before. Unless I have created it wrong?
If I don’t create the relationship I get an error within the visual.
Any help would be much appreciated.
Thanks,
Boycie92
Hi,
I cannot get your desired structure but i have got the numbers right. Download my folder from here.
Hope this helps.
Thanks for getting back to me.
Your solution would work as it does get the numbers correct however the layout I described is essential. The goal here is to compare both Sources by year and quarter. Sadly your solution does not achieve this.
Can you think of anything else that would be able to help me?
Also I was wondering if you knew the M code version of EOMONTH? So I can calculate the last date within a month?
Your help is much appreciated.
Thanks,
Boycie92
Hi all,
In case anyone else has a similar problem I have found a solution. However it’s not very elegant.
Solution:
From there I was able to get the desired layout and correct figures.
Thanks,
Boycie92
Hi @Boycie92,
You related sourceA to sourceB using the unique ID in sourceC instead of date. Maybe the end date of a record A related to recordB is in first quarter, while the end date of recordB is in second quarter. So for your sceanrio, I suggest you create a Calendar table including all dates in sourceA and sourceB. Please review Calendar function: https://msdn.microsoft.com/en-us/library/dn802546.aspx.
Then select the Calendar[Date], Unique ID A, Unique ID B, Total Sales A, Total Sales B in matrix and check if it works fine.
Best Regards,
Angelia
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
100 | |
80 | |
64 | |
58 |
User | Count |
---|---|
148 | |
111 | |
94 | |
84 | |
67 |