Hello,
I'm trying to make a measure that yields the sum of hours divided by the total number of hours per given year.
This measure gives me something similar to what I want (considering that the number of days in a year is approxemately 8760):
Machine | Date | Machine hour |
1 | 01.01.2021 | 1000 |
1 | 01.02.2021 | 1000 |
1 | 01.01.2022 | 10 |
1 | 01.02.2022 | 20 |
2 | 01.01.2021 | 500 |
2 | 01.02.2021 | 500 |
2 | 01.01.2022 | 5 |
2 | 01.02.2022 | 10 |
The plot should look something like this:
Solved! Go to Solution.
@mjohnsen Hi, Is this your desired outcome?
Hi, @mjohnsen
You can try the following methods.
Column:
Year = YEAR([Date])
Measure:
Measure =
Var _Sum=CALCULATE(SUM('Table'[Machine hour]),ALLEXCEPT('Table','Table'[Machine],'Table'[Year]))
Return
DIVIDE(_Sum,365*24)
Is this the result you expect?
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks! It seems like the measure does what I want.
Hi, @mjohnsen
You can try the following methods.
Column:
Year = YEAR([Date])
Measure:
Measure =
Var _Sum=CALCULATE(SUM('Table'[Machine hour]),ALLEXCEPT('Table','Table'[Machine],'Table'[Year]))
Return
DIVIDE(_Sum,365*24)
Is this the result you expect?
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@mjohnsen Hi, Is this your desired outcome?
Power BI release plans for 2023 release wave 1 describes all new features releasing from April 2023 through September 2023.
This session will provide guidance and teach campers the skills required to build Power BI reports that support multiple languages.
Make sure you register today for the Power BI Summit 2023. Don't miss all of the great sessions and speakers!
User | Count |
---|---|
110 | |
61 | |
44 | |
29 | |
22 |
User | Count |
---|---|
143 | |
93 | |
82 | |
46 | |
41 |