cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
harshadsp
Post Patron
Post Patron

Get value by joining 3 tables

Need your help.

 

I have mapped 3 tables in power bi :- premium, claim_occ, clim_sfx.

 

Premium table has pol_id and claims_occ have pol_id along with clm_id and clms_sfx has claim_id.

 

select s.*
from CLAIM_OCC o,
        CLAIM_Sfx s,
        PREMIUM p
where o.CLM_ID = s.CLM_ID
and o.INCRD_DIV = s.INCRD_DIV
and o.POL_ID = p.POL_ID
and s.POL_LOB_CD = p.LOB_CD
and s.ST_CLASS_CD = p.CLASS_CD
and s.ST_TERR_CD = p.TERR_CD
and o.POL_ST_CD_ALPHA = p.ST_CD_ALPHA
and isnull(s.gcic_cov_cd, -1) = p.BP_COV_GCIC_COV_CD
and o.POL_ID = 292791

 

I need to get the clm_amt from claim_sfx table. Could you please advise how could I get this done in power bi using dax or any other technique?

 

Please advise. Thank you!

1 ACCEPTED SOLUTION
v-huizhn-msft
Microsoft
Microsoft

Hi @harshadsp,

The relationship between Premium table and claims_occ, claims_occ and clms_sfx are one-to-one, one-to-many or many-to-one? Have you uploaded the three tables to Power Bi desktop? If you haven't, where are they stored? If they're stored in SQL Server database, you can use the T-SQL directly in the SQL statement box when you import data.

1.PNG

Best Regards,
Angelia

View solution in original post

1 REPLY 1
v-huizhn-msft
Microsoft
Microsoft

Hi @harshadsp,

The relationship between Premium table and claims_occ, claims_occ and clms_sfx are one-to-one, one-to-many or many-to-one? Have you uploaded the three tables to Power Bi desktop? If you haven't, where are they stored? If they're stored in SQL Server database, you can use the T-SQL directly in the SQL statement box when you import data.

1.PNG

Best Regards,
Angelia

Helpful resources

Announcements
Exciting changes

Power BI Community Changes

Check out the changes to the Power BI Community announced at Build.

May 2023 update

Power BI May 2023 Update

Find out more about the May 2023 update.

Kudo Data Story carousel

Data Stories Gallery

Visit our Data Stories Gallery and give kudos to your favorite Data Stories.

Top Solution Authors