Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
Hi All,
I have requriement in Paginated Report where I am using 4 tables to join
PayItem, Projects, Date and BilledRevenueDetail.
My Dax Query Editor giving me this below error. please help.
My Code
EVALUATE
VAR PayItemProjects =
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])
)
VAR BilledPayItem =
ADDCOLUMNS(
SUMMARIZE(
BilledRevenueDetail,
BilledRevenueDetail[PayItemId],
BilledRevenueDetail[BilledDate]
),
"SumBilledRevenue", CALCULATE(SUM(BilledRevenueDetail[BilledRevenue])),
"BilledQuantity", CALCULATE(SUM(BilledRevenueDetail[BilledQuantity]))
)
VAR DateInfo =
SELECTCOLUMNS(
Date,
"BilledDate", Date[Date],
"Year", Date[Year],
"MonthName", Date[MonthName]
)
VAR Result =
NATURALINNERJOIN(
PayItemProjects,
BilledPayItem
)
VAR FinalResult =
NATURALINNERJOIN(
Result,
DateInfo
)
RETURN
SELECTCOLUMNS(
FinalResult,
"PayItemId", [PayItemId],
"Project_id", [Project_id],
"ProjectName", [ProjectName],
"PayItemNumber", [PayItemNumber],
"Description", [Description],
"UnitofMeasureName", [UnitofMeasureName],
"ForecastTakeOffQuantity", [ForecastTakeOffQuantity],
"ForecastUnitRevenue", [ForecastUnitRevenue],
"SumForecastFinalRevenue", [SumForecastFinalRevenue],
"BilledQuantity", [BilledQuantity],
"SumBilledRevenue", [SumBilledRevenue],
"BilledDate", [BilledDate],
"Year", [Year],
"MonthName", [MonthName]
)
Solved! Go to Solution.
Date is a key word in DAX. If you have a table called Date you need to quote it with single quotes.
eg 'Date'[Date] instead of just Date[Date]
Date is a key word in DAX. If you have a table called Date you need to quote it with single quotes.
eg 'Date'[Date] instead of just Date[Date]
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 1 |