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.
Hello,
I have been beating my head agains a wall for a week and need the help others. I am able to pivot two sets of data into two separate report screens. I am also able to "pivot" the two sets of data with GROUPBY into two separate tables. I cannot for the life of me figure out how to combine the two tables into one.
Made Table:
Dimension | Date | Made |
1 | 2020-11-03 | 1000 |
2 | 2020-11-03 | 1100 |
3 | 2020-11-03 | 900 |
4 | 2020-11-03 | 1200 |
5 | 2020-11-03 | 1300 |
6 | 2020-11-03 | 100 |
7 | 2020-11-03 | 500 |
8 | 2020-11-03 | 600 |
9 | 2020-11-03 | 500 |
Sampled Table:
Dimension | Date | Sampled |
1 | 2020-11-03 | 50 |
2 | 2020-11-03 | 30 |
3 | 2020-11-03 | 50 |
4 | 2020-11-03 | 50 |
5 | 2020-11-03 | 30 |
6 | 2020-11-03 | 30 |
7 | 2020-11-03 | 10 |
8 | 2020-11-03 | 50 |
9 | 2020-11-03 | 20 |
I've tried joins,different summarizes, and have gotten very lost trying to understand the more detailed use of filters etc....My goal is to be able to display all of the data in one table like this:
Dimension | Date | Made | Sampled |
1 | 2020-11-03 | 1000 | 50 |
2 | 2020-11-03 | 1100 | 30 |
3 | 2020-11-03 | 900 | 50 |
4 | 2020-11-03 | 1200 | 50 |
5 | 2020-11-03 | 1300 | 30 |
6 | 2020-11-03 | 100 | 30 |
7 | 2020-11-03 | 500 | 10 |
8 | 2020-11-03 | 600 | 50 |
9 | 2020-11-03 | 500 | 20 |
There are probably better ways when I bring the data in or when I create the tables themselves...I am hoping some more experienced minds can enlighten me.
Thanks!
Jeremy
Solved! Go to Solution.
Hi @JHopkins ,
There are two ways, one is to merge them in Power Query Editor.
Another way is to create a calculate column in Made table.
Sample column =
CALCULATE(
SUM('Sampled Table'[Sampled]),
FILTER(
'Sampled Table',
'Sampled Table'[Dimension]='Made Table'[Dimension]
&&'Sampled Table'[Date]='Made Table'[Date]))
If it doesn’t meet your requirement, could you please show the exact expected result based on the table that you have shared?
Best regards,
Community Support Team _ zhenbw
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
BTW, pbix as attached.
Hi @JHopkins ,
There are two ways, one is to merge them in Power Query Editor.
Another way is to create a calculate column in Made table.
Sample column =
CALCULATE(
SUM('Sampled Table'[Sampled]),
FILTER(
'Sampled Table',
'Sampled Table'[Dimension]='Made Table'[Dimension]
&&'Sampled Table'[Date]='Made Table'[Date]))
If it doesn’t meet your requirement, could you please show the exact expected result based on the table that you have shared?
Best regards,
Community Support Team _ zhenbw
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
BTW, pbix as attached.
This should work:
let
Source = Table.NestedJoin(#"Made Table", {"Dimension"}, #"Sampled Table", {"Dimension"}, "Sampled Table", JoinKind.Inner),
#"Expanded Sampled Table" = Table.ExpandTableColumn(Source, "Sampled Table", {"Sampled"}, {"Sampled"})
in
#"Expanded Sampled Table"
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 |
---|---|
114 | |
100 | |
81 | |
70 | |
62 |
User | Count |
---|---|
148 | |
116 | |
104 | |
90 | |
65 |