March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
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]))))))))))))
Solved! Go to Solution.
@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]
)
Proud to be a Super User! |
|
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
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.
@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]
)
Proud to be a Super User! |
|
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
134 | |
90 | |
90 | |
66 | |
58 |
User | Count |
---|---|
201 | |
137 | |
107 | |
70 | |
68 |