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.
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 |
Solved! Go to Solution.
Hi @Anonymous
Please add the calculated column [MonthofEnddate] then use the measure:
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
Hi @Anonymous
Please add the calculated column [MonthofEnddate] then use the measure:
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
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
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
112 | |
100 | |
80 | |
64 | |
57 |
User | Count |
---|---|
146 | |
110 | |
93 | |
84 | |
67 |