Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.
Hello All,
I try to make a new DAX function in my dataset :
Solved! Go to Solution.
Hi @Vanessa250919 ,
It's ok to count boolean values. Try this measure.
Measure = CALCULATE(DISTINCTCOUNT('Table'[id]),FILTER(ALL('Table'),'Table'[boolean]=TRUE()))
In your formula you have missed the ")" after "true())".
Best Regards,
Jay
Hi @Vanessa250919 ,
It's ok to count boolean values. Try this measure.
Measure = CALCULATE(DISTINCTCOUNT('Table'[id]),FILTER(ALL('Table'),'Table'[boolean]=TRUE()))
In your formula you have missed the ")" after "true())".
Best Regards,
Jay
One way is to convert the boolean value to an integer:
INT(TRUE()) returns a value of 1 If true or blank if false. So use this expression in measure (instead of TRUE()) and then you can simply sum the values.
Proud to be a Super User!
Paul on Linkedin.
Hello,
Did you try using DISTINCTCOUNT instead of COUNTA?
Yes but it's not Ok with true or false values .
Is [CallID] of type Boolean?
Can you please share your sample data please?
Nope, I need number of disctinct call ID when Rona answered is TRUE or FALSE
Then it should work, as you are trying to apply Count operation on CallID which is a non- boolean column, it won't have any issue.
See a small example I have done:
Two measures I created:
Count with COUNTA = CALCULATE(COUNTA('Table'[CallID]), FILTER('Table','Table'[Roma Answered]= TRUE()))
Outcome- 5
Count with DistinctCount = CALCULATE(DISTINCTCOUNT('Table'[CallID]),FILTER('Table','Table'[Roma Answered] = TRUE()))
Outcome-4
You can further do the required customizations
Thanks for your help, I try to add my other values like in bellow but it doent"s work
I think I can make to calculate with boolean values in powerBI, always one issue message .
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 79 | |
| 38 | |
| 31 | |
| 27 | |
| 27 |