Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register 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! |
|
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
94 | |
84 | |
84 | |
73 | |
49 |
User | Count |
---|---|
143 | |
132 | |
110 | |
65 | |
55 |