Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Understanding DAX Query

Hi, I have following DAX query which used to return values but user is saying it stoppped working since few months. I am not able to understand the DAX here. Someone help me understand the DAX output...
  • v-piga-msft's avatar
    v-piga-msft
    7 years ago

    Hi Anonymous ,


    Old Formula: Tenancies New:=CALCULATE(COUNTROWS(Tenancy), 'Tenancy Date', FILTER(ALL( Tenancy[TenancyEndDate]),ISBLANK(Tenancy[TenancyEndDate])),'Geo Group')

     

    New Formula: Tenancies New:=CALCULATE(COUNTROWS(Tenancy),'Tenancy Date', FILTER(ALL(Tenancy[TenancyEndDate]),(Tenancy[TenancyEndDate])<> BLANK()),'Geo Group')



    Based on your two formulas, it seems that the result should be really different.

     

    For the old formula, you will calcualted the rows that the Tenancy[TenancyEndDate] is blank.

     

    For the new formula, you will calculate the rows that the Tenancy[TenancyEndDate] is not blank. So you could get the result with this formula for your scenario.

     

    Best Regards,

    Cherry