Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Calculate Count based on sum not equal to 0

Hi PB buddy,

 

I would like to have a measure as such result, would anyone help, thanks

 

 

count column A where sum of column B is not 0, the outcome should be 2

 

Many thanks

  • Hi,

    These measures work

    Measure = COUNTROWS(FILTER(SUMMARIZE(VALUES(Data[Customer]),Data[Customer],"ABCD",CALCULATE([Total],Data[Code]=1)),[ABCD]<>0))
    Measure 2 = COUNTROWS(FILTER(SUMMARIZE(VALUES(Data[Customer]),Data[Customer],"ABCD",CALCULATE([Total],Data[Code]=1),"EFGH",CALCULATE([Total],Data[Code]=2)),[ABCD]<>0&&[EFGH]<>0))
    Hope this helps.

7 Replies

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi Anonymous , thanks for your reply, pardon English is not my primary language, I've already searched previous post but can't get a right answer, I've made my question as simple as possible as well. 

      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi Anonymous  ,

        No problem.

        1. Please share sample data via copy/paste (no picture) or share .pbix file.

        2. Please share what is your expected result from sample data.

         

        Cheers,

        Rob