Forum Discussion

grggmrtn's avatar
grggmrtn
Icon for Post Patron rankPost Patron
6 years ago
Solved

Adding a common year column to a table with two date columns... need to slice

This is only a small part of a very big picture, but I hope I can explain the problem correctly. Using a seperate date table won't work for this since a) my date table is using it's relations on othe...
  • tex628's avatar
    6 years ago

    grggmrtn,

    My advice would still be to create a seperate calendar if you don't already have one. 🙂

    Create a calendar and then make 2 inactive relationships from Calendar[Date] to startdate / enddate. 

    Finally create 2 measures. One counting rows using the startdate as the active relationship and one using enddate. 

    Should look something like this: 

    Count_Startdate =
    CALCULATE(
    COUNTROWS('Table') ;
    USERELATIONSHIP(
    'Table'[StartDate] ; 
    'Calendar'[Date]
    )


    Br,
    J