Forum Discussion
Dax Calc countif
- Anonymous3 years ago
Hi Anonymous ,
Text is not computable for aggregation, I think you need to convert the data type first.
Through here to change the data type:
and then you can do some calculation.
Refer to my pbix file for better understanding.
Best regards,
Community Support Team Selina zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
I dont think and if will work for dax. I am just looking to COUNT [F RETAIL FH FIRST/FURTHER] when its = to "FIRST" OR "FURTHER"
Ok, here is another option:
your_measure =
CALCULATE (
COUNT ( 'F RETAIL FH FIRST'[FURTHER] ),
'F RETAIL FH FIRST'[FURTHER] IN { "FIRST", "FURTHER" }
)- Anonymous3 years agoNot applicable
Thats not getting me the answer I need. below is the calc I am trying to convert from qlik to pbi. The RTL_First_further is text if that helps.
sum(if(RTL_FIRST_FURTHER = 'FIRST',1,
if(RTL_FIRST_FURTHER = 'FURTHER' ,1,null())))- Anonymous3 years agoNot applicable
Hi Anonymous ,
What is the logic you are trying to convey?
My idea: This is your filtering criteria F RETAIL FH FIRST[FURTHER] = "FIRST" or "FURTHER".
When this condition is met, you need to count or sum some data? Is this what you have in mind?
Best regards,
Community Support Team Selina zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
- Anonymous3 years agoNot applicable
Hi,
Yes that is exactly what I have in mind. I just need the sum of F RETAIL FH FIRST[FURTHER] after the condition is met, but I have diffucutlties because it is text.
Thanks.