Forum Discussion
Infinity error
- 4 years ago
Anonymous ,if Attrition rate is proble, refer my blog
If infinity error then use divide
divide(
IF(LASTDATE('Calendar'[Date]), CALCULATE(COUNTA('Termination Power BI'[Employee_ID]),
DATESBETWEEN('Calendar'[Date],NEXTDAY(SAMEPERIODLASTYEAR(LASTDATE(('Calendar'[Date])))),LASTDATE(('Calendar'[Date]))))
,
CALCULATE(COUNTA(ExcelDB_Headcount[Employee ID]), LASTDATE('Calendar'[Date]))))
Anonymous , can share formula,
If you are dividing then use divide function
example
divide(sum(Table[A]),sum(Table[B]))
Hi amitchandak ,
Below is the DAX I'm using at present in my report:
I cannot use DIVIDE in this situation as I need to filter out the NUMERATOR based on the dates.
Regards,
Mahesh
- amitchandak4 years ago
Super User
Anonymous ,if Attrition rate is proble, refer my blog
If infinity error then use divide
divide(
IF(LASTDATE('Calendar'[Date]), CALCULATE(COUNTA('Termination Power BI'[Employee_ID]),
DATESBETWEEN('Calendar'[Date],NEXTDAY(SAMEPERIODLASTYEAR(LASTDATE(('Calendar'[Date])))),LASTDATE(('Calendar'[Date]))))
,
CALCULATE(COUNTA(ExcelDB_Headcount[Employee ID]), LASTDATE('Calendar'[Date]))))
- Anonymous4 years agoNot applicable
amitchandak , I've tried using DIVIDE but now I do not see any value for OCT-20 in my report. It's just giving blank
- amitchandak4 years ago
Super User
Anonymous , first of all, check why are you getting oct -21 head count 0. I see that as issue.
In divide you can return 0 for infinity case
divide(a,b,0)