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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

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

MayPowerBICarousel

Power BI Monthly Update - May 2024

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

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.