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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
NickProp28
Post Partisan
Post Partisan

select the specific column when apply crossjoin

Dear Comunity,

 

Here is the crossjoin code, but i do not want ConsolNumber appear two time in this table. I tried many time but still occured syntax error. I had refered this website (https://www.sqlbi.com/articles/from-sql-to-dax-joining-tables/) but I didnt get the solution.

 

Newtable = FILTER(CROSSJOIN(TEU,Summarize(Client, Client[ConsolNumber], Client[Unique Match Column] )),Client[ConsolNumber]= TEU[ConsolID]
NickProp28_0-1615885369272.png

ConsolNumber = Client[ConsolNumber]
Unique Match Column = Client[Unique Match Column]

Teu= TEU[TEU]

ETD= TEU[ETD]

Client[ConsolNumber]=TEU[ConsolNumber]
I knew there have append queries option in query editor, but since column unique match is a measure column. So I cant use this option. 

 

Kindly have a look on this pbix: https://ufile.io/lcuc78v5

 
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@NickProp28 , summarize on top of it

like

Newtable = SUMMARIZE(FILTER(CROSSJOIN(TEU,Summarize(Client, Client[ConsolNumber], Client[Unique Match Column] )),Client[ConsolNumber]= TEU[ConsolID]), [ConsolNumber],[Unique Match Column],[ETD],[TEU])

 

 

check if selectcolumns can help too

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@NickProp28 , summarize on top of it

like

Newtable = SUMMARIZE(FILTER(CROSSJOIN(TEU,Summarize(Client, Client[ConsolNumber], Client[Unique Match Column] )),Client[ConsolNumber]= TEU[ConsolID]), [ConsolNumber],[Unique Match Column],[ETD],[TEU])

 

 

check if selectcolumns can help too

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.