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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
MattScruggs
Frequent Visitor

Measure using 2 different tables, filtered by calendar table.

I have a measure that I am trying to build that will calculate A/B for each line in 2 different tables

 

for example: 

 

50/5 = 10 

where 50 is 'Table 1'[Feet]

and 5 is 'Table 2'[Hours]

either or both can potentially be 0. 

 

I tried F/H = SUM('Table 1'[Feet])/SUM('Table 2'[Hours]), Which theoretically works, until I try to I put it on a bar graph with Month as the axis. It show data for every month on Table 1, even though Table 2 only has three months entered. 

 

I need to be able to break this up by Project, Site, and Step. Both tables have these as columns. 

 

 

 
 
1 REPLY 1
amitchandak
Super User
Super User

@MattScruggs , Unles Table 1 and Table2 are in 1-M or M-1 relation. You should create a common date and other dimesion tables and analyze using those common tables.

 

Change you formula like

F/H = divide(SUM('Table 1'[Feet]),SUM('Table 2'[Hours]))

 

Refer:https://www.sqlbi.com/articles/the-importance-of-star-schemas-in-power-bi/

https://www.seerinteractive.com/blog/join-many-many-power-bi/

 

Please provide your feedback comments and advice for new videos
Tutorial Series Dax Vs SQL Direct Query PBI Tips
Appreciate your Kudos.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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