Forum Discussion

SYChan_22's avatar
SYChan_22
New Member
4 years ago
Solved

Count rows if more than 0.00 for multiple rows (considering different columns)

Hi Team, I am new to Power BI. I am currently looking for a solution on DAX measure. I would like to count the rows if the column Far (Left) OR Far (right) is more than 0.00 OR the column Near (Left) OR Near (right) is more than 0.00. See attached screenshot. The desired results that fit the condition would be 5, if count manually. I have tried several other formulas but it never work. Desperately looking for solution here. Thanks in advance. Cheers!

 

  • smpa01's avatar
    smpa01
    4 years ago

    SYChan_22  show the index in the matrix and use this as a measure

     

    Measure = 
    COUNTROWS (
        FILTER (
            
                tbl,
                
            ABS(CONVERT ( tbl[Prescription: Far left], DOUBLE )) > 0
                || ABS(CONVERT ( tbl[Prescription: Far right], DOUBLE )) > 0
                || ABS(CONVERT ( tbl[Prescription: Near left], DOUBLE )) > 0
                || ABS(CONVERT ( tbl[Prescription: Near right], DOUBLE )) > 0
        )
    )

18 Replies