Custom percantages

I got stuck with calculating of percentages within reports.
the inputs
I have a custom field in jira (select one option from two) - billed / not billed. all tasks have this field, and time logged within each task.
I imported the data to eazyBI and built a custom report that gathered logged time by user and divided into billed/not billed colums.
Next I tried to calculate the percentages, how much is billed hours in relation to tatal hours. And the best I can get to - is to see true/false value within column.
will be glad to hear any ideas. thank you

IIF( [Measures].[Hours spent] > 0,
[Billing Type].[Billable],
[Measures].[Hours spent]
) /
[Measures].[Hours spent] * 100

this code shows 0% instead of 50%

Hi @olena_suvorova

Welcome to the eazyBI community!
I recommend using the CASE statement (CASE statement) instead of IFF and if you’d like to return the results as %, you should select the Percentage formatting before saving the formula (Calculated measures)

Try the below formula and see if works for you.

[Measures].[Hours spent] > 0
([Billing Type].[Billable],
[Measures].[Hours spent]) 
([Measures].[Hours spent],
[Billing Type].CurrentHierarchy.DefaultMember)
--if needed to divide by hours spent across All Times, add another line "[Time].CurrentHierarchy.DefaultMember"

Best wishes,

Elita from