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.
Hello
I am trying to calculate the annual electricity expenditure target but I am only able to calculate monthly and not annually.
the annual target should be calculated by removing 3% of the value consumed in 2018. that is, in 2019 we subtract 3% in 2020 we subtract 6% ... and we divide this value by the number of pieces made.
after all this I do the average in the year the power bi is showing the value of 9.05 as the target for 2019 which is correct but when I drill down on the graph it shows me the monthly values and not a straight line with the value of 9.05.
I don't know if I managed to be clear.
please excuse my english. here's the simple ones from the file.
Thanks a lot for the help
Solved! Go to Solution.
@Anonymous wrote:Hello
I am trying to calculate the annual electricity expenditure target but I am only able to calculate monthly and not annually.
the annual target should be calculated by removing 3% of the value consumed in 2018. that is, in 2019 we subtract 3% in 2020 we subtract 6% ... and we divide this value by the number of pieces made.
after all this I do the average in the year the power bi is showing the value of 9.05 as the target for 2019 which is correct but when I drill down on the graph it shows me the monthly values and not a straight line with the value of 9.05.
I don't know if I managed to be clear.
please excuse my english. here's the simple ones from the file.
Thanks a lot for the help
If you want to see the value for the year when you drill down to the month level, you could change your calc to...
objective v2 =
VAR __current_yr =
SELECTEDVALUE(
calender[Year],
MAX( 'calender'[Year] )
)
VAR __retval =
AVERAGEX(
CALCULATETABLE(
ALL( 'calender'[Month] ),
REMOVEFILTERS( 'calender' ),
'calender'[Year] = __current_yr
),
CALCULATE(
'Measure'[AverageofaMeasure]
)
)
RETURN
__retval
... but for this to work, you need to rebuild your table using the Month/Year columns from *your* date table (not the ones from the auto-generated date table...
@Anonymous wrote:Hello
I am trying to calculate the annual electricity expenditure target but I am only able to calculate monthly and not annually.
the annual target should be calculated by removing 3% of the value consumed in 2018. that is, in 2019 we subtract 3% in 2020 we subtract 6% ... and we divide this value by the number of pieces made.
after all this I do the average in the year the power bi is showing the value of 9.05 as the target for 2019 which is correct but when I drill down on the graph it shows me the monthly values and not a straight line with the value of 9.05.
I don't know if I managed to be clear.
please excuse my english. here's the simple ones from the file.
Thanks a lot for the help
If you want to see the value for the year when you drill down to the month level, you could change your calc to...
objective v2 =
VAR __current_yr =
SELECTEDVALUE(
calender[Year],
MAX( 'calender'[Year] )
)
VAR __retval =
AVERAGEX(
CALCULATETABLE(
ALL( 'calender'[Month] ),
REMOVEFILTERS( 'calender' ),
'calender'[Year] = __current_yr
),
CALCULATE(
'Measure'[AverageofaMeasure]
)
)
RETURN
__retval
... but for this to work, you need to rebuild your table using the Month/Year columns from *your* date table (not the ones from the auto-generated date table...
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 |
---|---|
109 | |
98 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
100 | |
86 | |
64 |