Create a column with value based on user

Hi, im trying to create a report with the payroll i get the billed hours and need to multiple with the hour tax of each customer. So i want to create a column with a basic logic, if the logged by was (name of user) then 100, after multiple this 100 with billed hours
i was trying that = CASE
WHEN [Logged by].CurrentHierarchyMember,[Logged by].[User]
then 100

Hi @Viol1914

You are on the right track with CASE statement. I have also added Descendants() function in the formula, to iterate through every logged by user, and you can define the rule (by how much the billed hours need to be multiplied) based on the Logged by user name.
See the formula below and adjust the “Name of User” and multiplication value accordingly.

Sum(
  Descendants([Logged by].CurrentMember,[Logged by].CurrentHierarchyMember ),
  [Measures].[Billed hours] *
  CASE[Logged by].CurrentHierarchyMember.Name
  WHEN "Name of User1" THEN 100
  WHEN "Name of User2" THEN 110
  WHEN "Name of User3" THEN 120
  END
)

Let me know if I missed something and if you have some further questions!
Kind regards,
Elita from support@eazybi.com