cancel
Showing results for
Did you mean:
Highlighted
Anonymous
Not applicable

## Divide sum of one column by sum of another column then filter by month

Hi, absolute beginner here. With reference to the data below, I want to create a bar chart which displays the values of total weight/ total hours by month. Month is filtered by end date. So for instance total weight/ total hours for June is (100 + 75) / (0.75 + 1) = 100,

and (150+40 +200) / (1.5 +1+4) = 60.

Any help is much appreciated!

 Start Date End Date Hours Weight 1/6/2019 0:15 1/6/2019 1:00 0.75 100 4/6/2019 8:00 4/6/2019 9:00 1 75 30/6/2019 23:30 1/7/2019 1:00 1.5 150 1/7/2019 6:00 1/7/2019 7:00 1 40 6/7/2019 0:15 6/7/2019 4:15 4 200

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team

## Re: Divide sum of one column by sum of another column then filter by month

Hi @Anonymous

```ME = MONTH(Table1[End Date])

Measure = var a = CALCULATE(SUM(Table1[Weight]),ALL(Table1),VALUES(Table1[ME]))
var b = CALCULATE(SUM(Table1[Hours]),ALL(Table1),VALUES(Table1[ME]))
Return
DIVIDE(a,b)```

Best regards,

Dina Ye

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
2 REPLIES 2
Community Support Team

## Re: Divide sum of one column by sum of another column then filter by month

Hi @Anonymous

```ME = MONTH(Table1[End Date])

Measure = var a = CALCULATE(SUM(Table1[Weight]),ALL(Table1),VALUES(Table1[ME]))
var b = CALCULATE(SUM(Table1[Hours]),ALL(Table1),VALUES(Table1[ME]))
Return
DIVIDE(a,b)```

Best regards,

Dina Ye

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Community Support Team

## Re: Divide sum of one column by sum of another column then filter by month

Hi @Anonymous ,

If my above post helps, could you please consider Accept it as the solution to help the other members find it more quickly. thanks!

Best regards,
Dina Ye

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Announcements

#### Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

#### Power BI Helps Homeless and Trouble Youth

We spoke with Power BI Super User, Greg Deckler, about his charity work

#### Watch Sessions On Demand!

Continue your learning in our online communities.

Top Kudoed Authors
Users Online
Currently online: 268 members 3,070 guests
Recent signins: