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!View all the Fabric Data Days sessions on demand. View schedule
Hi all,
I've a table1:
| Type | Phase1 | Phase2 | Phase3 |
| Type1 | 12 | ||
| Type2 | 10 | ||
| Type3 | 8 | 14 |
and I would like to get the following table in a visual:
| Phase | Data |
| Phase1 | 12 |
| Phase2 | 18 |
| Phase3 | 14 |
To get this result, I get the following code:
Table2 =
UNION(
SUMMARIZE(Table1;"Phase";"Phase1";"Data";SUM(Table1[Phase1]));
SUMMARIZE(Table1;"Phase";"Phase2";"Data";SUM(Table1[Phase2]));
SUMMARIZE(Table1;"Phase";"Phase3";"Data";SUM(Table1[Phase3]))
)
But I cannot create a new table in live connection so I assume it has to be stored in a measure.
Measure =
var tableTemp =
UNION(
SUMMARIZE(Table1;"Phase";"Phase1";"Data";SUM(Table1[Phase1]));
SUMMARIZE(Table1;"Phase";"Phase2";"Data";SUM(Table1[Phase2]));
SUMMARIZE(Table1;"Phase";"Phase3";"Data";SUM(Table1[Phase3]))
)
RETURN
...
The issue is I don't see how to proceed now with the RETURN...
Any idea ?
Regards,
CR
Solved! Go to Solution.
Well, that's a pickle because normally you would do something like:
Measure =
var tableTemp =
UNION(
SUMMARIZE(Table1;"Phase";"Phase1";"Data";SUM(Table1[Phase1]));
SUMMARIZE(Table1;"Phase";"Phase2";"Data";SUM(Table1[Phase2]));
SUMMARIZE(Table1;"Phase";"Phase3";"Data";SUM(Table1[Phase3]))
)
RETURN
SUMX(FILTER(tableTemp,[Phase] = MAX('Table'[Phase])),[Data])
But, this would require that you have those Phase1, Phase2, Phase3 for your visual.
I cannot think of a way around this. With a Live connection, you will have to adjust the model by either unpivoting those columns in the model (on the live data source you are connecting to) or create a disconnected table in the live data source you are connecting to.
Well, that's a pickle because normally you would do something like:
Measure =
var tableTemp =
UNION(
SUMMARIZE(Table1;"Phase";"Phase1";"Data";SUM(Table1[Phase1]));
SUMMARIZE(Table1;"Phase";"Phase2";"Data";SUM(Table1[Phase2]));
SUMMARIZE(Table1;"Phase";"Phase3";"Data";SUM(Table1[Phase3]))
)
RETURN
SUMX(FILTER(tableTemp,[Phase] = MAX('Table'[Phase])),[Data])
But, this would require that you have those Phase1, Phase2, Phase3 for your visual.
I cannot think of a way around this. With a Live connection, you will have to adjust the model by either unpivoting those columns in the model (on the live data source you are connecting to) or create a disconnected table in the live data source you are connecting to.
Try Unpivot and then you should be able, to sum up
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!