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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
JuradoKevin14
Frequent Visitor

How to multiply two different Tables Dax Query

Hi I have this 2 tables that I want to multiply with 3 filters.

Year : 

Market Year

Carrier:

 

JuradoKevin14_0-1706893144918.png

First Table 1

RVUYearCPTMODCPTmoddescripworkRVUNonFacTotFacTotYearCPTmod
202227299NA27299Pelvis/hip joint surgery0.000.000.002022 - 27299
202225999NA25999Forearm or wrist surgery0.000.000.002022 - 25999
202227599NA27599Leg surgery procedure0.000.000.002022 - 27599
202226989NA26989Hand/finger surgery0.000.000.002022 - 26989
202227899NA27899Leg/ankle surgery procedure0.000.000.002022 - 27899
20220520FNA0520FRad dos limts b/4 3d rad0.000.000.002022 - 0520F
20220520TNA0520TRmvl&rplcmt pg wcs new eltrd0.000.000.002022 - 0520T
20220521FNA0521FPlan of care 4 pain docd0.000.000.002022 - 0521F
20220521TNA0521TInterrog dev eval wcs ip0.000.000.002022 - 0521T
202221088NA21088Prepare face/oral prosthesis0.000.000.002022 - 21088
20221034FNA1034FCurrent tobacco smoker0.000.000.002022 - 1034F
202221089NA21089Prepare face/oral prosthesis0.000.000.002022 - 21089
20221035FNA1035FSmokeless tobacco user0.000.000.002022 - 1035F
20220522TNA0522TPrgrmg dev eval wcs ip0.000.000.002022 - 0522T
20221036FNA1036FTobacco non-user0.000.000.002022 - 1036F
20221038FNA1038FPersistent asthma0.000.000.002022 - 1038F
20221039FNA1039FIntermittent asthma0.000.000.002022 - 1039F
20220523TNA0523TNtrapx c ffr w/3d funcjl map0.000.000.002022 - 0523T
20221040FNA1040FDsm-5 info mdd docd0.000.000.002022 - 1040F
20220524TNA0524TEv cath dir chem abltj w/img0.000.000.002022 - 0524T

 

 

Table 2 

ServiceCenterRegionCarrierNamePlanNameCPTMODCPTmodnCh sumUnits  sumVolRVU  sumValExp  sumAmtCh  sumAmtApprv DateTimeUpdateProposed RVU VolumeYearCPTmod
Portland MetroCigna 99024 9902412.000.000.000.000.0007/07/2023 17:2722020 - 99024
Portland MetroProvidence 2028F 2028F12.000.000.000.000.0007/07/2023 17:2722020 - 2028F
Portland MetroRegence (BCBS) 4000F 4000F12.000.000.000.000.0007/07/2023 17:2722020 - 4000F
Portland MetroUHC 99024 9902412.000.000.000.000.0007/07/2023 17:2722020 - 99024
Southern WillametteProvidence 1101F 1101F12.000.000.000.000.0007/07/2023 17:2722020 - 1101F
Southern WillametteRegence (BCBS) 1101F 1101F12.000.000.000.000.0007/07/2023 17:2722020 - 1101F
Southern WillametteUHC 99024 9902412.000.000.000.000.0007/07/2023 17:2722020 - 99024
Central ORCigna J0588 J058812.000.000.000.000.0007/07/2023 17:2722021 - J0588
Central ORRegence (BCBS) A4450 A445012.000.000.000.000.0007/07/2023 17:2722021 - A4450
Mid-WillametteRegence (BCBS) 99024 9902412.000.000.000.000.0007/07/2023 17:2722021 - 99024
Northeast ORProvidence 99024 9902412.000.000.000.000.0007/07/2023 17:2722021 - 99024
Northeast ORUHC 99499 9949912.000.000.000.000.0007/07/2023 17:2722021 - 99499
Portland MetroAetna 2028F 2028F12.000.000.000.000.0007/07/2023 17:2722021 - 2028F
Portland MetroMODA 99024 9902412.000.000.000.000.0007/07/2023 17:2722021 - 99024
Portland MetroRegence (BCBS) 2028F 2028F12.000.000.000.000.0007/07/2023 17:2722021 - 2028F
Portland MetroRegence (BCBS) 99024 9902412.000.000.000.000.0007/07/2023 17:2722021 - 99024
Portland MetroUHC 99024 9902412.000.000.000.000.0007/07/2023 17:2722021 - 99024
Southern WillametteAetna 1100F 1100F12.000.000.000.000.0007/07/2023 17:2722021 - 1100F
Southern WillametteAetna 3288F 3288F12.000.000.000.000.0007/07/2023 17:2722021 - 3288F
Southern WillametteCigna 99024 9902412.000.000.000.000.0007/07/2023 17:2722021 - 99024
Southern WillametteFirst Choice 1100F 1100F12.000.000.000.000.0007/07/2023 17:2722021 - 1100F
Southern WillametteHealth Net G8427 G842712.000.000.000.000.0007/07/2023 17:2722021 - G8427
Southern WillametteMODA 1100F 1100F12.000.000.000.000.0007/07/2023 17:2722021 - 1100F
Southern WillametteProvidence 3072F 3072F12.000.000.000.000.0007/07/2023 17:2722021 - 3072F
Southern WillametteRegence (BCBS) 1100F 1100F12.000.000.000.000.0007/07/2023 17:2722021 - 1100F
Southern WillametteRegence (BCBS) 3072F 3072F12.000.000.000.000.0007/07/2023 17:2722021 - 3072F
Southern WillametteRegence (BCBS) G8482 G848212.000.000.000.000.0007/07/2023 17:2722021 - G8482
Southern WillametteUHC 1101F 1101F12.000.000.000.000.0007/07/2023 17:2722021 - 1101F
Southern WillametteUHC 1220F 1220F12.000.000.000.000.0007/07/2023 17:2722021 - 1220F
Southern WillametteUHC G8482 G848212.000.000.000.000.0007/07/2023 17:272

2021 - G8482

 

not all the data where there. But that is the data structure.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @JuradoKevin14 ,

 

According to your description, here are my steps you can follow as a solution.

(1) This is my test data.  

vtangjiemsft_0-1707100173272.png

(2) We can create a calculated column.

PostYear = LEFT('Table 2'[YearCPTmod],4)

(3) We can create a measure.

Measure = 
var _a=SELECTEDVALUE('Table 1'[RVUYear])
var _b=SELECTEDVALUE('Table 2'[CarrierName])
var _c=SELECTEDVALUE('Table 2'[PostYear])
var _d=CALCULATE(SUM('Table 2'[ sumUnits ]),FILTER(ALLSELECTED('Table 2'),'Table 2'[CPT]=MAX('Table 1'[CPT])))
var _e=CALCULATE(MIN('Table 1'[NonFacTot]),FILTER(ALLSELECTED('Table 1'),'Table 1'[CPT]=MAX('Table 1'[CPT])))
RETURN _d*_e

(4) Then the result is as follows.

vtangjiemsft_1-1707100274870.png

 

If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.

 

Best Regards,

Neeko Tang

If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly. 

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @JuradoKevin14 ,

 

According to your description, here are my steps you can follow as a solution.

(1) This is my test data.  

vtangjiemsft_0-1707100173272.png

(2) We can create a calculated column.

PostYear = LEFT('Table 2'[YearCPTmod],4)

(3) We can create a measure.

Measure = 
var _a=SELECTEDVALUE('Table 1'[RVUYear])
var _b=SELECTEDVALUE('Table 2'[CarrierName])
var _c=SELECTEDVALUE('Table 2'[PostYear])
var _d=CALCULATE(SUM('Table 2'[ sumUnits ]),FILTER(ALLSELECTED('Table 2'),'Table 2'[CPT]=MAX('Table 1'[CPT])))
var _e=CALCULATE(MIN('Table 1'[NonFacTot]),FILTER(ALLSELECTED('Table 1'),'Table 1'[CPT]=MAX('Table 1'[CPT])))
RETURN _d*_e

(4) Then the result is as follows.

vtangjiemsft_1-1707100274870.png

 

If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.

 

Best Regards,

Neeko Tang

If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly. 

lbendlin
Super User
Super User

Multiply as in cross join?  Or outer join? Inner join?

 

What's the expected result based on your sample data?

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.