Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreWe've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now
Hi,
I have a formula to combine 2 tables
Table 1.
Date Category Additional Category Qty
1-Jan-17 A Add-1 10
1-Jan-17 B 7
2-Jan-17 A Add-1 2
2-Jan-17 A 15
3-Jan-17 C 4
Table 2 combines Table 1 & converting Additional Category = "Add-1" entries to Category C
the formula is
UNION (
SELECTCOLUMNS( FILTER(Table1,Table1[Additional Category] = "Add-1"),
"Date",Table1[Date],
"Category",SUBSTITUTE(Table1[Category],"A","C"),
"Qty",Table1[Qty]))
Thus, the result I expected is
Category Qty
A 27 (10+2+15)
B 7
C 29 (10+2+4, which comes from Qty from Category = C & Additional Category = Add-1)
However, what I got is
Category Qty
A 27 (10+2+15)
B 7
C 4
It seems that the Qty from Additional Category = Add-1 where the Category has been changed from "A" to "C" is not included in the Category C.
Is there anything wrong in my formula?
Need advise. Thanks.
Solved! Go to Solution.
Hi @RMV,
It seems your formula is incomplete. I created a new one. Would you like to try it?
Table 2 =
SUMMARIZE (
'Table1',
Table1[Category],
"Value", IF (
'Table1'[Category] = "C",
CALCULATE (
SUM ( Table1[QTY] ),
FILTER (
ALL ( 'Table1' ),
'Table1'[Category] = "C"
|| 'Table1'[Additional Category] = "Add-1"
)
),
SUM ( Table1[QTY] )
)
)
Best Regards!
Dale
Hi @RMV,
It seems your formula is incomplete. I created a new one. Would you like to try it?
Table 2 =
SUMMARIZE (
'Table1',
Table1[Category],
"Value", IF (
'Table1'[Category] = "C",
CALCULATE (
SUM ( Table1[QTY] ),
FILTER (
ALL ( 'Table1' ),
'Table1'[Category] = "C"
|| 'Table1'[Additional Category] = "Add-1"
)
),
SUM ( Table1[QTY] )
)
)
Best Regards!
Dale
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 56 | |
| 40 | |
| 35 | |
| 19 | |
| 18 |
| User | Count |
|---|---|
| 70 | |
| 69 | |
| 38 | |
| 35 | |
| 23 |