Forum Discussion

StatStories_Lon's avatar
6 years ago
Solved

Filter Measure on Date, created by summarize date

Dear all,   My name is Ruud and I posted last week a topic in which I had a problem. That problem was solved to a certain extent and I have put the topic to solved. I could not un-solve the topic, ...
  • V-lianl-msft's avatar
    V-lianl-msft
    6 years ago

    Hi StatStories_Lon ,

     

    Sorry, I may have misunderstood you.

    Please replace the filter condition "all" of the measure with "ALLSELECTED".

     

    Measure = 
    VAR _tbl = SUMMARIZE(Dim_Contract, Dim_Contract[ContractId], Dim_Users[UserId], Dim_Contract[Start_Date], Dim_Contract[End_Date], "Qtde Hours",
    CALCULATE(SUM('Fact_Target Hours'[Target Hours]), FILTER(ALLSELECTED('Fact_Target Hours'),
    'Fact_Target Hours'[medewerker_id] = EARLIER(Dim_Users[UserId]) &&
    'Fact_Target Hours'[Datum] >= EARLIER(Dim_Contract[Start_Date]) &&
    'Fact_Target Hours'[Datum] <= EARLIER(Dim_Contract[End_Date]) &&
    'Fact_Target Hours'[Datum] <= TODAY()
    ))
    )
    RETURN SUMX(_tbl, [Qtde Hours])

     

    What really puzzles me is here

     

     

    Best Regards,
    Liang
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.