Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Hi Folks,
I have Period ,FeeType, FeeDescri columns in my model. i want to add new column based on Period and Feetype.
Ex: 2022Q1 and QF then i want to add First Quarter 2002 + FeeDescri
Ex2: 202209 and MF then i want to add September 2022+ FeeDescri
Can we achive this with DAX. Please help me
Thanks in Advance.
Solved! Go to Solution.
Hi @Gopal_PV
Please refer to attached sample file with the proposed solution
Result =
VAR CurrentDescription = 'Table'[FeeDescri]
VAR CurrentPeriod = 'Table'[Period]
VAR CurrentYear = LEFT ( CurrentPeriod, 4 )
VAR MonthOrQuarter1 = SUBSTITUTE ( CurrentPeriod, CurrentYear, "" )
VAR MonthOrQuarter2 =
IF (
ISERROR ( VALUE ( CurrentPeriod) ),
SWITCH (
RIGHT ( MonthOrQuarter1, 1 ),
"1", "First Quarter",
"2", "Second Quarter",
"3", "Third Quarter",
"4", "Fourth Quarter"
),
FORMAT ( DATE ( CurrentYear, MonthOrQuarter1, 1 ), "mmmm" )
)
RETURN
MonthOrQuarter2 & " " & CurrentYear & " " & CurrentDescription
Hi @Gopal_PV
Please refer to attached sample file with the proposed solution
Result =
VAR CurrentDescription = 'Table'[FeeDescri]
VAR CurrentPeriod = 'Table'[Period]
VAR CurrentYear = LEFT ( CurrentPeriod, 4 )
VAR MonthOrQuarter1 = SUBSTITUTE ( CurrentPeriod, CurrentYear, "" )
VAR MonthOrQuarter2 =
IF (
ISERROR ( VALUE ( CurrentPeriod) ),
SWITCH (
RIGHT ( MonthOrQuarter1, 1 ),
"1", "First Quarter",
"2", "Second Quarter",
"3", "Third Quarter",
"4", "Fourth Quarter"
),
FORMAT ( DATE ( CurrentYear, MonthOrQuarter1, 1 ), "mmmm" )
)
RETURN
MonthOrQuarter2 & " " & CurrentYear & " " & CurrentDescription
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the June 2024 Power BI update to learn about new features.
User | Count |
---|---|
70 | |
36 | |
21 | |
18 | |
15 |
User | Count |
---|---|
126 | |
32 | |
28 | |
24 | |
24 |