Forum Discussion

Nilsstigel's avatar
Nilsstigel
Frequent Visitor
4 years ago
Solved

Time intelligence - Show dates with no data on date axis

Dear all   I have a problem which i hope you can help me solve.   I am trying to visualize open vacancies (talent recruitment) over time - could be month or by date.   I have following dataset ...
  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi Nilsstigel ,

    Please refer to my pbix file to see if it helps you.

    Create a new table.

    Months =
    DISTINCT (
        SELECTCOLUMNS (
            CALENDARAUTO (),
            "MonthNo.", MONTH ( [Date] ),
            "Month", FORMAT ( [Date], "MMM" )
        )
    )
    

    Then create a measure.

    Measure =
    CALCULATE (
        SUM ( 'Table'[NumberofVacancies] ),
        FILTER (
            ALLSELECTED ( 'Table' ),
            SELECTEDVALUE ( Months[MonthNo.] ) >= MONTH ( 'Table'[RegistrationDate] )
                && SELECTEDVALUE ( Months[MonthNo.] ) <= MONTH ( 'Table'[ApplicationDeadline] )
        )
    )
    

    Or a column.

    column =
    CALCULATE (
        SUM ( 'Table'[NumberofVacancies] ),
        FILTER (
            ALLSELECTED ( 'Table' ),
            Months[MonthNo.] >= MONTH ( 'Table'[RegistrationDate] )
                && Months[MonthNo.] <= MONTH ( 'Table'[ApplicationDeadline] )
        )
    )
    

    Best Regards
    Community Support Team _ Polly

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