cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Levent
Frequent Visitor

selected rows and union of 2 columns in new table

Hi everybody,

 

Can you help me please. I want to do UNION and filter from 1 table to new table with DAX.

 

I try SUMMARIZE ... but i can't do. 

 

merge_table.png

 

Thanks a lot for your response !

1 ACCEPTED SOLUTION

Accepted Solutions
Super User IV
Super User IV

Re: selected rows and union of 2 columns in new table

@Levent you can achieve this by using DAX, go to modelling tab and click new table, and following expression

 

New Table = 
UNION(
    SELECTCOLUMNS( Table1, "Date", Table1[CreateDate], "Budget", Table1[Budget] ),
    SELECTCOLUMNS( FILTER( TABLe1, NOT ISBLANK(Table1[DateWin]) ), "Date", Table1[DateWin], "Budget", -(Table1[Budget]) ),
    SELECTCOLUMNS( FILTER( TABLe1, NOT ISBLANK(Table1[DateLoose]) ), "Date", Table1[DateLoose], "Budget", -(Table1[Budget]))
)





Did I answer your question? Mark my post as a solution.

Proud to be a Datanaut! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.





View solution in original post

2 REPLIES 2
Super User IV
Super User IV

Re: selected rows and union of 2 columns in new table

@Levent you can achieve this by using DAX, go to modelling tab and click new table, and following expression

 

New Table = 
UNION(
    SELECTCOLUMNS( Table1, "Date", Table1[CreateDate], "Budget", Table1[Budget] ),
    SELECTCOLUMNS( FILTER( TABLe1, NOT ISBLANK(Table1[DateWin]) ), "Date", Table1[DateWin], "Budget", -(Table1[Budget]) ),
    SELECTCOLUMNS( FILTER( TABLe1, NOT ISBLANK(Table1[DateLoose]) ), "Date", Table1[DateLoose], "Budget", -(Table1[Budget]))
)





Did I answer your question? Mark my post as a solution.

Proud to be a Datanaut! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.





View solution in original post

Levent
Frequent Visitor

Re: selected rows and union of 2 columns in new table

Thanks a lot ! Smiley Very Happy

 

Helpful resources

Announcements
New Ranks Launched March 24th!

New Ranks Launched March 24th!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power BI Community!

‘Better Together’ Contest Finalists Announced!

‘Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Arun 'Triple A' Event Video, Q&A, and Slides

Arun 'Triple A' Event Video, Q&A, and Slides

Missed the Arun 'Triple A' event or want to revisit it? We've got you covered! Check out the video, Q&A, and slides now.

Top Solution Authors
Top Kudoed Authors