Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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.
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
24 | |
9 | |
7 | |
6 | |
6 |
User | Count |
---|---|
29 | |
11 | |
11 | |
10 | |
6 |