Hours spent multiplied by the hourly rate

Hello,
I have a jira issues which have some worklogs. I need to create a column where I multiply the hours by their hourly rate, which is different each year.

I’ve created calculated member formula, but I don’t see the price per hour for every listing

[Measures].[Hours spent]*
(CASE
  when Year(TimestampToDate([Measures].[Worklog timestamp])) = 2021 then 420
  when Year(TimestampToDate([Measures].[Worklog timestamp])) = 2022 then 440
END)

In this table I currently show the year 2022.

Unfortunately, I have no idea where the mistake is. It happens when I have multiple job reports for one problem.

Thank you for your help.

Hi,

Perhaps a simpler solution is to detect the year from the selected member of the Time dimension:

[Measures].[Hours spent]*
(CASE
  when Year([Time].CurrentHierarchyMember.StartDate) = 2021 then 420
  when Year([Time].CurrentHierarchyMember.StartDate) = 2022 then 440
END)

More details on how the Worklog timestamp measure is built and the full design (definition) of the report would be needed for further guidance.

Kindly,
Janis, eazyBI support

Good day,
this works. Thank you.

Have a nice day,
Tomas

1 Like