Forum Discussion
atavo
Helper I
6 years agoDAX - userelationship - secondary date column has null dates
Hi
How would i handle an inactive relationship where the secondary date column (i.e close date) has some null dates.
I find that when i write a measure to count the no of accts closed, and then slice by month, the visual shows this in addition to a "blank" month row with a count of accounts that have null close dates.
How do i filter out this row from the visual using only measures?
Any assistance is greatly appreciated.
atavo , refer this blog how close/end date has been used in blog, where it can be blank
Terminated Employees = CALCULATE(COUNT(Employee[Employee Id ]),USERELATIONSHIP(Employee[End Date],'Date'[Date]),not(ISBLANK(Employee[End Date]))) Current Employees = CALCULATE(COUNTx(FILTER(Employee,Employee[Start Date]<=max('Date'[Date]) && (ISBLANK(Employee[End Date]) || Employee[End Date]>max('Date'[Date]))),(Employee[Employee Id ])),CROSSFILTER(Employee[Start Date],'Date'[Date],None))
1 Reply
- amitchandak
Super User
atavo , refer this blog how close/end date has been used in blog, where it can be blank
Terminated Employees = CALCULATE(COUNT(Employee[Employee Id ]),USERELATIONSHIP(Employee[End Date],'Date'[Date]),not(ISBLANK(Employee[End Date]))) Current Employees = CALCULATE(COUNTx(FILTER(Employee,Employee[Start Date]<=max('Date'[Date]) && (ISBLANK(Employee[End Date]) || Employee[End Date]>max('Date'[Date]))),(Employee[Employee Id ])),CROSSFILTER(Employee[Start Date],'Date'[Date],None))