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
ashmitp869
Post Partisan
Post Partisan

Help needed with dax query

Hi All,

 

Help me out with the below dax query issue

I have a code 

EVALUATE
VAR __SelectedValue = 509
VAR PayItemProjects =
FILTER(
    ADDCOLUMNS(
        SUMMARIZE(
            PayItem,
            PayItem[PayItemId],
            PayItem[PayItemNumber],
            PayItem[Description],
            PayItem[UnitofMeasureName],
            PayItem[ForecastTakeOffQuantity],
            PayItem[ForecastUnitRevenue],
            PayItem[Project_id],
            "SumForecastFinalRevenue", SUM(PayItem[ForecastFinalRevenue])
        ),
		
        "ProjectName", LOOKUPVALUE(Projects[ProjectName], Projects[Project_id], PayItem[Project_id])
		
    ),
    PayItem[PayItemId] = 509)
// RETURN PayItemProjects



VAR BilledPayItem =
FILTER(
 SELECTCOLUMNS(
    SUMMARIZE(
        BilledRevenueDetail,
     	BilledRevenueDetail[PayItemId],
        BilledRevenueDetail[BilledDate],
        "SumBilledRevenue", SUM(BilledRevenueDetail[BilledRevenue]),
        "BilledQuantity", SUM(BilledRevenueDetail[BilledQuantity])
    ),
	 "PayItem[PayItemId]",LOOKUPVALUE(PayItem[PayItemId], PayItem[PayItemId], BilledRevenueDetail[PayItemId]),
	
	BilledRevenueDetail[BilledDate],
	[SumBilledRevenue],
    [BilledQuantity]
 )
 
   , PayItem[PayItemId] = 509)
   
  VAR Result =
    NATURALLEFTOUTERJOIN(
        PayItemProjects,
        BilledPayItem
    ) 
  Return Result	 

 

But getting error

 

ashmitp869_0-1722223222709.png

 

I have check the data types they are whole number. But still unable to solve.

 

When doing join in Data Model , all my output looks good.

Here is the result in Power Bi table view

ashmitp869_1-1722223330108.png

 

 

1 ACCEPTED SOLUTION
Dangar332
Super User
Super User

HI, @ashmitp869 

In Naturalleftouterjoin  Columns being joined must have the same data type and the same name in both tables.

here you take 9 column in Payitemprojects and 4 column from Billedpayitem.

Take same numbers of column from both tables with same name and same data type.

Refer Link  for more information.

 

Best Regards

Dangar.



View solution in original post

1 REPLY 1
Dangar332
Super User
Super User

HI, @ashmitp869 

In Naturalleftouterjoin  Columns being joined must have the same data type and the same name in both tables.

here you take 9 column in Payitemprojects and 4 column from Billedpayitem.

Take same numbers of column from both tables with same name and same data type.

Refer Link  for more information.

 

Best Regards

Dangar.



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.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.