Forum Discussion
Count a Measure or Countif
Can you try the same formula for the measure and check what it results?
# times =
CALCULATE(
COUNTROWS('TransDetail'),
ALLEXCEPT('TransDetail',
'TransDetail'[SYSTEM_NUM],
'TransDetail'[EARN_DEDUCT_IND]=1) 'the underline part gives an error'
)t
! A single value for column EARN_DEDUCT_IND in TransDetail cannot be determined. THis can happen when a measure formula to a column that contains many values without specifying an aggregation such as min, max, count or sum to get to a single result.
Is this what you meant?
- Amratya9 years agoAdvocate I
remove =1
- Corleen9 years agoRegular Visitor
I have removed the 1 and it gives me a result.
But not the result what I want.
Would please explain the Measure to me
Thank you
- Amratya9 years agoAdvocate I
This measure simply count the number of rows in SYSTEM_NUM that matches each row in EARN_DEDUCT_IND no matter what is the value in EARN_DEDUCT_IND
- v-caliao-msft9 years agoMicrosoft Employee
Please try the DAX below.
# times =
CALCULATE(
COUNTROWS('TransDetail'),
FILTER(ALLEXCEPT('TransDetail',
'TransDetail'[SYSTEM_NUM]),'TransDetail'[EARN_DEDUCT_IND]=1)
)Regards,
Charlie Liao
- Anonymous8 years agoNot applicable
I am facing the same issue with getting count of measure output. Can you please help in providing the specific solution!
Thanks
- Anonymous8 years agoNot applicable
Hello,
I am facing the same problem with getting count of measure. Can you please provide a relevent solution.
Thanks,
rax