Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Excel Countifs Vs PowerBI Countrows

Hey guys,   I'm just wondering if you could help me find the bug on my DAX formula we're just replicating the ones in Excel. The data set is the same, since most replicated formulas are now giving ...
  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi Anonymous ,

    Thanks for granting the permission to access the file, now I can access it successfully. As checked the file, please update the formula of calculated column [Column9_PBIequi] as below and you can get the expected result...

    Column9_PBIequi = 
    IF (
        'Dummy data'[Column8_PBIequi] = 1,
        IF (
            COUNTROWS (
                FILTER (
                    'Dummy data',
                    'Dummy data'[Column2] <> BLANK ()
                        && 'Dummy data'[Column2] = EARLIER ( 'Dummy data'[Column2] )
                        && 'Dummy data'[Date] > EARLIER ( 'Dummy data'[Date] )
                        && 'Dummy data'[Date]
                            <= EARLIER ( 'Dummy data'[Date] ) + 2
                        && 'Dummy data'[Column8_PBIequi] = 0
                )
            ) > 0,
            1,
            0
        ),
        0
    )

    Best Regards