Counting through a Boolean

  • 2 October 2023
  • 1 reply

Userlevel 2
Badge +2

Dear community,


This is a quick one. I have a Boolean metric with one dimension (Employee). The metric shows a list of employees with the tick box marked.

I am struggling to generate a KPI that show me the number of employees in the list. What’s the best way to approach this outcome?

Many thanks in advance :D


Metric: if(Transaction List. Bolean property'[by firstnonblank: Same Transaction List.Employee Name],


I obtain a list like



Best answer by Nathan 2 October 2023, 21:53

View original

1 reply

Userlevel 6
Badge +10

Hi Guillermo,


Two ways:

You can do a BY COUNT on the boolean metric:

Metric[BY COUNT:your other metric of dimension]


You can create in your table, at the same dimensionality of your boolean, a number metric that does IF(Boolean,1) and then you can use that in your formula; CounterMetric[By SUM:your dimensions]

You can also do the count directly in your formula:

If(boolean,1)[BY SUM:your dimensions]