Forum Discussion
Anonymous
4 years agoNot applicable
IF statement returns 0%
Hi guys, My previous colleague wrote an Dax If statement to return a percentage of a number. Below you can see the dax statement The problem is that I don't understand this statement. Dax I...
- 4 years ago
Hi Anonymous, have you tried just using DIVIDE?:
ProductivityA = DIVIDE([InvoicingTargetInHours], [NormWorkingHours]) - 4 years ago
Hi Anonymous ,
The reason why it is displaying 0% is due to the first part of your if statement (bold) where it explicitly returns 0 if InvoicingTargetInHours and NormWorkingHours are equal:
ProductivityA =
IF (
[InvoicingTargetInHours] - [NormWorkingHours] = 0,
0,
IFERROR (
( [InvoicingTargetInHours] / [NormWorkingHours] ),
0)
)If you would like to diplay 100%, I'd suggest to use the DIVIDE function as Russel-PBI suggested:
ProductivityA = DIVIDE([InvoicingTargetInHours], [NormWorkingHours])/Tom
Russell-PBI
4 years agoResolver II
Hi Anonymous, have you tried just using DIVIDE?:
ProductivityA = DIVIDE([InvoicingTargetInHours], [NormWorkingHours])