March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi,
My problem is as below.
I have table 1 structured like:
Date , Name , Value
Table 2:
Date , Name , Value
Table 3 : Calendar (single values)
Table 1 and 2 contains multiple date & name values.
I would like to have a table 4 which contains summarized column value by Date(days) and Names as below
Date(Days), Name, Value(t1), Value(t2)
Could someone relate to this?
Thanks in advance!
Solved! Go to Solution.
@hejszyszky , best is append and group by in power query ,as ut can taken column that do not match too
https://radacad.com/append-vs-merge-in-power-bi-and-power-query
https://docs.microsoft.com/en-us/power-query/group-by
or
New Table =
var _Tab = Union(
Summarize(Table1, Date[Day], Table1[Name], "Value", 0, "Value1", sum(Table1[Value1]) , "Value2", sum(Table1[Valu2]) ) ,
Summarize(Table2, Date[Day], Table2[Name], "Value", sum(Table2[Value]) , "Value1", 0 ,"Value2", 0 )
)
return
Summarize(_tab, [Day], [Name], "Value", sumX(_tab,[Value]), "Value1", sumX(_tab,[Value1]) , "Value2", sumX(_tab,[Value2]) )
New Table =
var _Tab = Union(
Summarize(Table1, Date[Day], Table1[Name], "Value", sum(Table1[Name])) ,
Summarize(Table2, Date[Day], Table2[Name], "Value", sum(Table2[Name]))
)
return
_tab
or
New Table =
var _Tab = Union(
Summarize(Table1, Date[Day], Table1[Name], "Value", sum(Table1[Name])) ,
Summarize(Table2, Date[Day], Table2[Name], "Value", sum(Table2[Name]))
)
return
Summarize(_tab, [Day], [Name], "Value", sumX(_tab,[Value]))
Hi, Thanks for your response @amitchandak !
I forgot to add that the values refer to something different, so union wont work well here 😞 (names are the same tho)
My bad!
For better undestranding:
Table 1:
Date Name Value1 Value2
1-11-2021 A 3 500
1-11-2021 A 4 50
2-11-2021 A 5 5
2-11-2021 B 6 5000
3-11-2021 A 7 5000
Table2:
Date Name Value
1-11-2021 B 3
1-11-2021 B 5
1-11-2021 A 4
2-11-2021 A 5
2-11-2021 B 6
3-11-2021 C 7
Outside of table 1 and 2 i would like to create Table3 as below:
Date Name Value Value1 Value 2
1-11-2021 A 0 7 550
1-11-2021 B 8 0 0
2-11-2021 A 5 11 5005
2-11-2021 B 6 6 5000
3-11-2021 C 7 0 0
3-11-2021 A 0 7 5000
@hejszyszky , best is append and group by in power query ,as ut can taken column that do not match too
https://radacad.com/append-vs-merge-in-power-bi-and-power-query
https://docs.microsoft.com/en-us/power-query/group-by
or
New Table =
var _Tab = Union(
Summarize(Table1, Date[Day], Table1[Name], "Value", 0, "Value1", sum(Table1[Value1]) , "Value2", sum(Table1[Valu2]) ) ,
Summarize(Table2, Date[Day], Table2[Name], "Value", sum(Table2[Value]) , "Value1", 0 ,"Value2", 0 )
)
return
Summarize(_tab, [Day], [Name], "Value", sumX(_tab,[Value]), "Value1", sumX(_tab,[Value1]) , "Value2", sumX(_tab,[Value2]) )
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
133 | |
90 | |
88 | |
64 | |
58 |
User | Count |
---|---|
201 | |
137 | |
107 | |
70 | |
68 |