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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Ewa_28
Helper II
Helper II

data in seperating columns. How to do it?

Hello,
 
I created the following formula: CombinedData =
    UNION(
        SELECTCOLUMNS(
            'Stemple',
            "Typ", "Sales",
            "Value", 'Stemple'[Sales],
            "Person", 'Stemple[Person],
            "Week", 'Stemple'[Week],
            "Q_numer", 'Stemple'[Q_numer],
            "Region", 'Stemple'[Region],
            "Year", 'Stemple'[Year]
        ),
        SELECTCOLUMNS(
            'Plany data',
            "Typ", "Plany",
            "Value", 'Plany data'[Value],
            "NPerson", 'Plany data'[Negocjator],
            "Week", 'Plany data'[Week],
            "Q_numer", 'Plany data'[Q_numer],
            "Region", 'Plany data'[Region],
            "Year", 'Plany data'[Year]
        )
    )
- it works. BUT I need data Plany and Sales in seperated columns. How to do it?
2 ACCEPTED SOLUTIONS
Laxmanjatoth
Resolver I
Resolver I

try this 
CombinedData =
UNION(
SELECTCOLUMNS(
'Stemple',
"Typ", "Sales",
"Sales", 'Stemple'[Sales], -- Sales value in a separate column
"Plany", BLANK(), -- Empty (blank) for the "Plany" column
"Person", 'Stemple'[Person],
"Week", 'Stemple'[Week],
"Q_numer", 'Stemple'[Q_numer],
"Region", 'Stemple'[Region],
"Year", 'Stemple'[Year]
),
SELECTCOLUMNS(
'Plany data',
"Typ", "Plany",
"Sales", BLANK(), -- Empty (blank) for the "Sales" column
"Plany", 'Plany data'[Value], -- Plany value in a separate column
"Person", 'Plany data'[Negocjator],
"Week", 'Plany data'[Week],
"Q_numer", 'Plany data'[Q_numer],
"Region", 'Plany data'[Region],
"Year", 'Plany data'[Year]
)
)

View solution in original post

Laxmanjatoth
Resolver I
Resolver I

please  mark accept the solutions

View solution in original post

3 REPLIES 3
Laxmanjatoth
Resolver I
Resolver I

please  mark accept the solutions

Ewa_28
Helper II
Helper II

Hi @Laxmanjatoth 
Your solution works!!! Thank you very much.

 

Regards

Laxmanjatoth
Resolver I
Resolver I

try this 
CombinedData =
UNION(
SELECTCOLUMNS(
'Stemple',
"Typ", "Sales",
"Sales", 'Stemple'[Sales], -- Sales value in a separate column
"Plany", BLANK(), -- Empty (blank) for the "Plany" column
"Person", 'Stemple'[Person],
"Week", 'Stemple'[Week],
"Q_numer", 'Stemple'[Q_numer],
"Region", 'Stemple'[Region],
"Year", 'Stemple'[Year]
),
SELECTCOLUMNS(
'Plany data',
"Typ", "Plany",
"Sales", BLANK(), -- Empty (blank) for the "Sales" column
"Plany", 'Plany data'[Value], -- Plany value in a separate column
"Person", 'Plany data'[Negocjator],
"Week", 'Plany data'[Week],
"Q_numer", 'Plany data'[Q_numer],
"Region", 'Plany data'[Region],
"Year", 'Plany data'[Year]
)
)

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors