Forum Discussion

SAPpowerbi's avatar
SAPpowerbi
Helper II
4 years ago
Solved

Count measure sum (Total) issue

Hello Team ,

 

I am creating DAX mesure as per my calculation Need , but i am not abel to Sum that measure , kindly help me on below dax.

 

DAX Measure - Measure 1 = IF('Revenue- 2021'[Value]<0,BLANK(),1)

 i wanted just sum of all the if count wherever 1 is showing .

 

Below Matrix Table for your referance -

 

 

Client name Revenue 2021Measure 1
ABC2001
XYZ1001
A- 
B1001
Total4003

 

I want just sum of my measure 1 - insted of 3 i am gatting 1 as a sum value kindly help me on this

 

Output - I want Measure 1 = totalsumeis 3 .

Thank you.

  • SAPpowerbi , assuming this is a measure -'Revenue- 2021'[Value]

     

    Countx(values(Table[Client name]),  IF('Revenue- 2021'[Value]<0,BLANK(),[Client name]) )

4 Replies

  • SAPpowerbi , assuming this is a measure -'Revenue- 2021'[Value]

     

    Countx(values(Table[Client name]),  IF('Revenue- 2021'[Value]<0,BLANK(),[Client name]) )

    • SAPpowerbi's avatar
      SAPpowerbi
      Helper II

      Hi ,

      Thank you for reply .
      revenue 2021 value - is my column .

      I am using this column and write this - Measure 1 = IF('Revenue- 2021'[Value]<0,BLANK(),1)

      Kindly help me if Revnue 2021 is column than how to write in dax.

      Thank you .

    • SAPpowerbi's avatar
      SAPpowerbi
      Helper II

      Thank you so much , this work for me .thnks alot God bless you .

  • Hi,

    Please check the below picture and the attached pbix file.

     

     

    Count measure greater than zero: =
    SUMX (
        ADDCOLUMNS (
            VALUES ( Data[Client name] ),
            "@conditionmeasure", CALCULATE ( IF ( [Rev 2021 measure:] <= 0, 0, 1 ) )
        ),
        [@conditionmeasure]
    )