Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi,
I have created two conditional columns using dax, now i want to Combine these columns into a single column.
I tried to use pivot/Unpivot option in the transform data section, but in the transform data section these newly created conditional column will not appear .
Please help me on this. how can i Combine these columns.
Solved! Go to Solution.
Hi @Anonymous ,
I created some data:
Power query will only display your source data, the columns you create with dax will not be displayed in Power query.
Here are the steps you can follow:
1. Create calculated table.
Table 2 =
var _1=
{
"Qtr",
"YTD"
}
var _2=VALUES('Table'[Index])
return
CROSSJOIN(_1,_2)
2. Create calculated column
Combine =
var _1=
CALCULATE(MAX('Table'[Qtr Status]),FILTER(ALL('Table'),'Table'[Index]=EARLIER('Table 2'[Index])))
var _2=
CALCULATE(MAX('Table'[YTD]),FILTER(ALL('Table'),'Table'[Index]=EARLIER('Table 2'[Index])))
return
IF(
[Value]="YTD",_2,_1)
3. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi @Anonymous ,
I created some data:
Power query will only display your source data, the columns you create with dax will not be displayed in Power query.
Here are the steps you can follow:
1. Create calculated table.
Table 2 =
var _1=
{
"Qtr",
"YTD"
}
var _2=VALUES('Table'[Index])
return
CROSSJOIN(_1,_2)
2. Create calculated column
Combine =
var _1=
CALCULATE(MAX('Table'[Qtr Status]),FILTER(ALL('Table'),'Table'[Index]=EARLIER('Table 2'[Index])))
var _2=
CALCULATE(MAX('Table'[YTD]),FILTER(ALL('Table'),'Table'[Index]=EARLIER('Table 2'[Index])))
return
IF(
[Value]="YTD",_2,_1)
3. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Can you provide the screenshot what would be your expected output
Did I answer your question? If so, please mark my post as a solution!
Proud to be a Super User!
I want a single column for Qtr Status and YTD values, instead of having different column.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.