Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
The below DAX expression returns the expected results in DAX Studio ( a two column table) when connected to a Power BI data model in the Service. However, when I attempt to use the same logic (the expression is modified at the end to return a scalar value and EVALUATE is removed), I receive these contect error messages as well as this overall error message.
Is there something different between how DAX studio is evaluating this and how Power BI is evaluating it?
******
EVALUATE
(
VAR dates =
SUMMARIZECOLUMNS (
dimDate[EndOfMonth],
dimDateMaturity[AdjustedMaturityDate],
"@diff",
[a] + [b] - [c]
)
VAR filtered =
FILTER ( dates, [@diff] < 0 )
VAR indexed =
INDEX (
1,
filtered,
ORDERBY ( [@diff], DESC ),
PARTITIONBY ( dimDate[EndOfMonth] )
)
RETURN
SELECTCOLUMNS (
indexed,
"Date", dimDate[EndOfMonth],
"Days", DATEDIFF ( dimDate[EndOfMonth], dimDateMaturity[AdjustedMaturityDate], DAY )
)
)
Hi,
Please try something like below.
I only wrote for SUMMAIZECOLUMNS part to suggest to change like below.
VAR dates =
ADDCOLUMNS (
SUMMARIZE (
YourFactTable,
dimDate[EndOfMonth],
dimDateMaturity[AdjustedMaturityDate]
),
"@diff",
[a] + [b] - [c]
)
I tried that and the same issue persists. Again, it works in DAX studio but it doesn't work in Power BI. For some reason the indexed variable is not able to reference the filtered variable.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 8 | |
| 6 | |
| 5 | |
| 5 | |
| 4 |
| User | Count |
|---|---|
| 25 | |
| 16 | |
| 8 | |
| 7 | |
| 7 |