Forum Discussion

DianaT's avatar
DianaT
Helper I
6 years ago
Solved

Transform boolean matrix into count?

Hi all,

 

I have a data set that looks like this:

Is it possible for Power BI to transform the boolean matrix into something like this:

 

Grad cohort        Count

GradPre1970        0

Grad70-79            0

Grad80-89            11,882

Grad90-99            20,401

etc.

 

Your help will be greatly appreciated.

 

Cheers,

Diana

 

  • DianaT 

    in the PQ, select count column and unpivot other columns.

    then you get a new data layout

    Then create a measure

    Measure = CALCULATE(sum('Table'[count]),FILTER('Table','Table'[Value]="YES"))+0

     

4 Replies