Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
Anonymous
Not applicable

Create a measure that combines measures into same column

Hi everyone,

 

I need to create a measure that combines column values and measures into one table. I had to create custom measures to get a custom count value for INT0 from another table. 

 

Table 1

INTRANK MEASURECount Measure
INT0570

 

Table 2 

INT RANK ColumnCount Measure
INT120
INT240
INT330
INT40
INT510

 

Desired outcome appends both together with both measures combined in same columns

Table 3

INT RANKCOUNT
INT0570
INT120
INT2

40

INT3

30

INT4

0

INT5

10

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous ,

Try

Create a new Table

 

Union(
selectcolumns(Table1, Table1[INTRANK MEASURE],"Count Measure" , sum(Table1[Count Measure])),
selectcolumns(Table2, Table2[INTRANK MEASURE], "Count Measure", sum(Table2[Count Measure]))
)
OR
Union(
selectcolumns(Table1, "INTRANK MEASURE",Table1[INTRANK MEASURE],"Count Measure" ,Table1[Count Measure]),
selectcolumns(Table2,"INTRANK MEASURE" ,Table2[INTRANK MEASURE],"Count Measure" ,Table2[Count Measure])
)

 

 

OR a new dimension table and join with both the tables

 

Union(
all(Table1[INTRANK MEASURE]),
all(Table2[INTRANK MEASURE])
)

 

And create a new measure

Count = sum(Table1[Count Measure])+ sum(Table2[Count Measure])

 

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
v-yingjl
Community Support
Community Support

Hi @Anonymous ,

You can try this measure to create a new table:

Table 3 =
UNION (
    SELECTCOLUMNS (
        'Table',
        "INT RANK", 'Table'[INTRANK MEASURE],
        "COUNT", 'Table'[Count Measure]
    ),
    SELECTCOLUMNS (
        'Table 2',
        "INT RANK", 'Table 2'[INT RANK Column],
        "COUNT", 'Table 2'[Count Measure]
    )
)

 You will get the expected result:

combine columns.png

 

Best Regards,
Yingjie Li

If this post helps then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@Anonymous ,

Try

Create a new Table

 

Union(
selectcolumns(Table1, Table1[INTRANK MEASURE],"Count Measure" , sum(Table1[Count Measure])),
selectcolumns(Table2, Table2[INTRANK MEASURE], "Count Measure", sum(Table2[Count Measure]))
)
OR
Union(
selectcolumns(Table1, "INTRANK MEASURE",Table1[INTRANK MEASURE],"Count Measure" ,Table1[Count Measure]),
selectcolumns(Table2,"INTRANK MEASURE" ,Table2[INTRANK MEASURE],"Count Measure" ,Table2[Count Measure])
)

 

 

OR a new dimension table and join with both the tables

 

Union(
all(Table1[INTRANK MEASURE]),
all(Table2[INTRANK MEASURE])
)

 

And create a new measure

Count = sum(Table1[Count Measure])+ sum(Table2[Count Measure])

 

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.