Forum Discussion
A function 'CALCULATE' has been used in a True/False expression that is used as a table filter expre
- 1 year ago
mcijerry Try using
DAX
PercentageOfUsersWithMoreThan2Endpoints =
VAR EmployeesWithMoreThan2Computers =
FILTER(
VALUES('EPD Endpoints'[RegEID]),
CALCULATE(
COUNT('EPD Endpoints'[ID]),
ALLEXCEPT('EPD Endpoints', 'EPD Endpoints'[RegEID])
) > 1
)VAR CountOfEmployeesWithMoreThan2Computers = COUNTROWS(EmployeesWithMoreThan2Computers)
VAR DistinctEmployeeCount = DISTINCTCOUNT('EPD Endpoints'[RegEID])RETURN
DIVIDE(CountOfEmployeesWithMoreThan2Computers, DistinctEmployeeCount, 0)
mcijerry Try using
DAX
PercentageOfUsersWithMoreThan2Endpoints =
VAR EmployeesWithMoreThan2Computers =
FILTER(
VALUES('EPD Endpoints'[RegEID]),
CALCULATE(
COUNT('EPD Endpoints'[ID]),
ALLEXCEPT('EPD Endpoints', 'EPD Endpoints'[RegEID])
) > 1
)
VAR CountOfEmployeesWithMoreThan2Computers = COUNTROWS(EmployeesWithMoreThan2Computers)
VAR DistinctEmployeeCount = DISTINCTCOUNT('EPD Endpoints'[RegEID])
RETURN
DIVIDE(CountOfEmployeesWithMoreThan2Computers, DistinctEmployeeCount, 0)
Interesting and almost there, the Measure at least passes inspection (and for the life of me I tried using FILTER everyewhere in the measure but did not know where to put it and to use it in place of CalculateTable)
Only issue now is I get 640.11 % 🙂