Forum Discussion

shahinnakhai's avatar
shahinnakhai
Frequent Visitor
6 years ago
Solved

undefinedFiscal period in Direct mode vs Import file

    Hello, thank you for the class. I want to create a report on the direct mode from SQL and calculate employment status of each month. I can easily do that on import mode with addi...
  • v-lid-msft's avatar
    v-lid-msft
    6 years ago

    Hi shahinnakhai ,

     

    We can create a Hierarchy using following calculated colmun after we format the calculated column Fiscal Period as a Date:

     

     

     

    Fiscal Period Year = YEAR('LaborRoster'[Fiscal Period])

     

    Fiscal Period Quartar = "Qtr " & QUARTER('LaborRoster'[Fiscal Period])

     

    Fiscal Period Month =
    SWITCH (
        MONTH ( 'LaborRoster'[Fiscal Period] ),
        1, "January",
        2, "February",
        3, "March",
        4, "April",
        5, "May",
        6, "June",
        7, "July",
        8, "August",
        9, "Sepember",
        10, "October",
        11, "November",
        12, "December"
    )

     

    Fiscal Period Day = DAY('LaborRoster'[Fiscal Period])

     

     


    Best regards,