• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Replicate this COUNTIFS with DAX

rolo

Member
Hello,

I have Excel COUNTIFS formulas, but I was not able to reproduce them using DAX functions

I would appreciate your valuable help!

You can download example here: easyupload.io
 

Chihiro

Excel Ninja
First create LastPeriod measure.
Code:
=CALCULATE(MAX([YEARMONTH]),FILTER(Tabla1,[TYPE]="ACTUAL"))
Then add HC BUDGET.
Code:
=
VAR LP = [LastPeriod]
RETURN
    CALCULATE (
        COUNTROWS ( Tabla1 ),
        FILTER ( Tabla1, [YEARMONTH] = LP && [TYPE] = "BUDGET" )
    )
Then just change condition for HC ACTUAL.

Add all 3 as values field to Pivot Table.

65140
 
Top