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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
admin11
Memorable Member
Memorable Member

How to combine Table 1 and 2 into 1 table ?

Hi All

 

My  TAB BRAND ,Table 1 working fine :-

admin11_0-1642670424147.png

MY TAB COY , TABLE 2 WORKING FINE :-

admin11_1-1642670547279.png

 

Can some one share with me how to combine table 1 and table 2 into one table ?

 

My sample PBI :-

https://www.dropbox.com/s/neiaj147r3hft53/SAMPLE_1000_SI_TI_V026.pbix?dl=0

 

Paul

 

5 REPLIES 5
v-chenwuz-msft
Community Support
Community Support

Hi @admin11 ,

 

Please check the link to your sample PBI. There is no file in it.

Are you trying to get the results of two tables combined and sorted by account. I think the best way is combine all the underlying data firstly, after that, get a rank for them.

 

Best Regards

Community Support Team _ chenwu zhu

Samarth_18
Community Champion
Community Champion

Hi @admin11 ,

 

There are two ways to do it:-

1. Append table 1 into table 2 in the power query

2. Or you can create a new table with below code:-

Table = UNION(s_ummrizeTable1,s_ummrizeTable2)

 

Thanks,

Samarth

Best Regards,
Samarth

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin

@Samarth_18 

Thank you for your sharing. appreciate very much.

 

In my actual application , it have total 5 s_ummarize_Table. 

 

I thinking the issue may be cause by rank field need to link up. i try , but i still unable to figure out how to link .  As this is a sample PBI file.

 

admin11_0-1642674763024.png

Below expression may be have some issue . it should be auto switch Rabk , but seen like it does not work :-

 

S_amount_TOTAL =
SWITCH(
SELECTEDVALUE(SliceTable[Slice]),
"BRAND_C",IF(ISINSCOPE(s_ummrizetable1[rank]),
CALCULATE(
SUM('SALES'[sales])
,FILTER(ALLSELECTED('SALES'),[BRAND_C]=MAX('s_ummrizeTable1'[BRAND_C]))),
SUM('SALES'[sales])),
"COMPANY",IF(ISINSCOPE(s_ummrizetable2[rank]),
CALCULATE(
SUM('SALES'[sales])
,FILTER(ALLSELECTED('SALES'),[COMPANY]=MAX('s_ummrizeTable2'[COMPANY]))),
SUM('SALES'[sales])))
 

Paul

@admin11  Could you please elaborate a bit about link up? You mean to make a relationship?

Best Regards,
Samarth

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin

@Samarth_18 

 

i just posted below post , which i explain very detail , hope you can help me :-

https://community.powerbi.com/t5/Desktop/Dynamic-dimension-only-work-for-Brand-but-not-Segment/m-p/2...

 

Paul

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.