Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Harish85
Helper I
Helper I

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";
If([v_Fiscal_Month]="04";"1";
If([v_Fiscal_Month]="03";"12";
If([v_Fiscal_Month]="02";"11";
If([v_Fiscal_Month]="01";"10";
If([v_Fiscal_Month]="12";"9";
If([v_Fiscal_Month]="11";"8";
If([v_Fiscal_Month]="10";"7";
If([v_Fiscal_Month]="09";"6";
If([v_Fiscal_Month]="08";"5";[v_Fiscal_Month]))))))))))))

2 ACCEPTED SOLUTIONS
bhanu_gautam
Super User
Super User

@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]
)




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






View solution in original post

Kedar_Pande
Super User
Super User

@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

View solution in original post

3 REPLIES 3
Kedar_Pande
Super User
Super User

@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

Thank you very much this helped a lot for me.

bhanu_gautam
Super User
Super User

@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]
)




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.