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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

Reply
jomikk
Helper I
Helper I

Create measure based of two tables

Hi, I have two tables, which are segmented by different years (the three bars) and different axis members. The values sum up.

 

How can I create a measure that properly does what I want below, while taking into account slicers?

 

 

test.PNG

 

I have tried

Measure = DIVIDE(SUM(TableA[2017]);SUM(TableB[2017]))

But that only gives me the total value, not segmented by the axis or slicers.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @jomikk,

 

You can get this result when you use shared dimensions. So for example if you have two tables with both a date column, you should add a calendar table that relates to these both tables containing a year column. This column should then be used in the chart.

 

If you use a measure that divides a SUM measure from both tables, it will do this based on the year from the calendar table that filters both tables with values.

 

Because it seems that you have columns with year's, please unpivot them so you have 1 column with Value and two rows with year. Join that year to a calendar table and voilla.

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @jomikk,

 

You can get this result when you use shared dimensions. So for example if you have two tables with both a date column, you should add a calendar table that relates to these both tables containing a year column. This column should then be used in the chart.

 

If you use a measure that divides a SUM measure from both tables, it will do this based on the year from the calendar table that filters both tables with values.

 

Because it seems that you have columns with year's, please unpivot them so you have 1 column with Value and two rows with year. Join that year to a calendar table and voilla.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.

October NL Carousel

Fabric Community Update - October 2024

Find out what's new and trending in the Fabric Community.