Forum Discussion

eiprakash's avatar
eiprakash
Frequent Visitor
8 years ago
Solved

Creating a measure that passes measure from different table

I have the below tables, Emp and Date. Connected by Date.   In the front end I have user selecting the Year from Date Table. I am trying to create a measure, that calculates count of Pernr from my ...
  • dedelman_clng's avatar
    dedelman_clng
    8 years ago

    To get around that error you have to do an explicit filter

     

    formula =
    CALCULATE ( COUNT ( Emp[Pernr] ), 
       FILTER(Emp, Emp[Date] = MAX ( Emp[Date] ) - 1 )
    )

    Hope this helps

    David

  • dedelman_clng's avatar
    dedelman_clng
    8 years ago

    Remove any existing filters on Emp by using ALL

     

    CALCULATE ( COUNT ( Emp[Pernr] ),
    Filter(ALL(Emp), Emp[Date] = MIN('Date'[Date])-1
    ))