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
Anonymous
Not applicable

Sum, divide and average of value field from two tables with no relationship

Hi,

 

I have two tables having similar column names only difference is the value column which I want to calculate.

 

adityaaranya6_0-1636592540848.png

 

There is no relationship between the two tables, it is many to many. I am trying to first sum the values column from both the tables and then divide the sum values to create a measure, but when I try to check with the columns the divide measure gives incorrect values.

 

adityaaranya6_1-1636592990064.png

 

I further want to create another measure to get the average of the divide measure till the week where value is not zero and store it in another measure. Can you suggest where I am going wrong.

3 REPLIES 3
v-angzheng-msft
Community Support
Community Support

Hi, @Anonymous 

 

May I ask if your problem has been solved? Is the above post helpful to you?

Is there an error in the percentages? What is the formula for your measure?

Could you please consdier sharing more details about it or a simple sample file without any sesentive information for further discussion?

 

 

 

Best Regards,
Community Support Team _ Zeon Zheng

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 , You should join these two tbale on common dimensions like time and store ,and then you can analyze

divide(Sum(Table1[Col]), Sum(Table2[Col]) ) should work

 

if need a simple avg

 

AverageX(values('Date'[week]), Calculate( divide(Sum(Table1[Col]), Sum(Table2[Col]) ) ))

Anonymous
Not applicable

Thanks @amitchandak , Should I create a date table and link the weekdays to it? Or should I add a time column for both the tables and join them together?

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.