Forum Discussion

Harish85's avatar
Harish85
Icon for Helper III rankHelper III
1 year ago
Solved

Created Fiscal_period using below sap formula

Below is the formula written in webi Report sap ,same variable should be created in powerbi v_fiscal_period =If([v_Fiscal_Month]="07";"4"; If([v_Fiscal_Month]="06";"3"; If([v_Fiscal_Month]="05";"2...
  • bhanu_gautam's avatar
    1 year ago

    Harish85 , Try using switch DAX

    v_fiscal_period =
    SWITCH(
    TRUE(),
    [v_Fiscal_Month] = "07", "4",
    [v_Fiscal_Month] = "06", "3",
    [v_Fiscal_Month] = "05", "2",
    [v_Fiscal_Month] = "04", "1",
    [v_Fiscal_Month] = "03", "12",
    [v_Fiscal_Month] = "02", "11",
    [v_Fiscal_Month] = "01", "10",
    [v_Fiscal_Month] = "12", "9",
    [v_Fiscal_Month] = "11", "8",
    [v_Fiscal_Month] = "10", "7",
    [v_Fiscal_Month] = "09", "6",
    [v_Fiscal_Month] = "08", "5",
    [v_Fiscal_Month]
    )

  • Kedar_Pande's avatar
    1 year ago

    Harish85 

    New Column DAX

    v_fiscal_period = 
    SWITCH(
    TRUE(),
    [v_Fiscal_Month] = "07", "4",
    [v_Fiscal_Month] = "06", "3",
    [v_Fiscal_Month] = "05", "2",
    [v_Fiscal_Month] = "04", "1",
    [v_Fiscal_Month] = "03", "12",
    [v_Fiscal_Month] = "02", "11",
    [v_Fiscal_Month] = "01", "10",
    [v_Fiscal_Month] = "12", "9",
    [v_Fiscal_Month] = "11", "8",
    [v_Fiscal_Month] = "10", "7",
    [v_Fiscal_Month] = "09", "6",
    [v_Fiscal_Month] = "08", "5",
    [v_Fiscal_Month]
    )

    💌 If this helped, a Kudos 👍 or Solution mark would be great! 🎉
    Cheers,
    Kedar
    Connect on LinkedIn