Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago

Connect different Calendars!

Good day!

 

Please help!

 

I have 3 columns with Planned start date, Planned finish date and Actual finish date. In one chart, I need to show how much was planned and how much was done by year, month, and week. The calendar is done like this:

Calendar = ADDCOLUMNS(CALENDAR(
                            MIN(
                                min('Activities Schedule'[PlannedStartDate]),
                                 min('Activities Schedule'[ActualFinishDate])),
                            MAX(
                                max('Activities Schedule'[ActualFinishDate]),
                                max('Activities Schedule'[PlannedFinishDate]))),
                    "Year", FORMAT([Date], "yyyy"),
                    "Quarter", "Q" & FORMAT([Date], "Q"),
                    "Month", FORMAT([Date], "mmmm"),
                     "Week", year([Date]) & "-W" & RIGHT("00" & WEEKNUM([Date], 2), 2))
 
Link made by PlannedFinishDate and Calendar. The chart only calculates those dates with PlannedFinishDate, and does not take the value of ActualFinishDate. I need to have a Plan column and ActualFinish along with it. Is it possible? I tried to create 2 calendars, it still doesn't work. If you connect the ActualFinishDate connection with Calendar, it does not show the plan.

6 Replies

  • olgad's avatar
    olgad
    Icon for Resident Rockstar rankResident Rockstar

    Hi Aidana, 
    create two relationships, one is to PlannedFinishDate (you have that one already), the second one is to ActualFinishDate (this will be inactive, as you cannot have two active relationships between two tables)
    Then,to calculate your measure for the Actualfinishdate, use the function USERELATIONSHIP. 
    Example:
    Calculate(Count(Activities), USERELATIONSHIP(CalendarDate, ActualFinishDate))
    Instead of Count(Activities) shall be your measure how you do the calculation, sum, count etc. 

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thanks!

      I did this formula:

      8. Formula = CALCULATE('Activities Schedule'[11. Activity7], USERELATIONSHIP('Activities Schedule'[ActualFinishDate], 'Calendar'[Date]))
       
      Now it does not show those dates that do not match the Planned Finish Date.
       

       

      • olgad's avatar
        olgad
        Icon for Resident Rockstar rankResident Rockstar

        Check a couple of things please.
        Are you using date from calendar on your x axis? 

    • Anonymous's avatar
      Anonymous
      Not applicable

      Activity = count of all activities in the cloumn

  • olgad's avatar
    olgad
    Icon for Resident Rockstar rankResident Rockstar

    What is behind 'Activities Schedule'[11. Activity7Activity7]. ? Which formula?