Forum Discussion

MaloPBI's avatar
MaloPBI
Regular Visitor
6 years ago
Solved

Counter days by action

Hey everybody!   I'm trying to solve this problems from two days ago and i cannot find the best solution.   I have 2 tables: Dates and Actions          I don't have a relationship...
  • MaloPBI's avatar
    MaloPBI
    6 years ago

    Hi everyone,

     

    I didn't find any possible solution with measures 😞 ...  but i found a workaroud using calculated tables.

     

    ActionsbyDate = 
    SELECTCOLUMNS( 
        FILTER(
                CROSSJOIN(Dates;Actions);
                Dates[Dates]>=Actions[StartDate]
                && Dates[Dates]<=Actions[EndDate]
        );
        "Dates";Dates[Dates];
        "NumMov";Actions[NumMov]
    )

     

    Then i can build this model

     

    And now i can get the correct analysis:

    DayValuesAction = COUNT(ActionsbyDate[Dates]) 

     

     

    If anyone knows how i can get that with measures i'd be great!

     

    Thanks a lot.

     

    Malo.