Forum Discussion

Milozebre's avatar
Milozebre
Helper V
7 years ago
Solved

sum if

Good morning Community, 

 

I try to make a sum if with column. 

 

I  have a table with name, days and how many hours the guy work per day. 

Nom MondayTuesdayWednesdayThursdayFridaySaturdaySunday
Pierre Cardin7777700
Jean Reno000001010

 

 

I want to know 

Pierre : 5 days

Jean : 2 

 

I read some response here but I cant transpose the solution.

 

Thanl you in advance

  • Hi Milozebre,

     

    You should unpivot tables first in Query Editor mode.

     

    Then, new a measure as below.

    Count working days = CALCULATE(COUNT(Table_1[Weekdays]),Table_1[Value]>0)

     

    Best regards,

    Yuliana Gu

2 Replies

  • v-yulgu-msft's avatar
    v-yulgu-msft
    Microsoft Employee

    Hi Milozebre,

     

    You should unpivot tables first in Query Editor mode.

     

    Then, new a measure as below.

    Count working days = CALCULATE(COUNT(Table_1[Weekdays]),Table_1[Value]>0)

     

    Best regards,

    Yuliana Gu