Forum Discussion
Query from Performance analyzer working in DAX Studio but not in Power BI Report Builder
I copied a query from performance analyzer in power bi and pasted it in query designer in Power Bi Report Builder.
The query works great in Power Bi, DAX Studio, but in Power Bi Report Builder it has a Null value being returned for one value.
// DAX Query
DEFINE
VAR __DS0FilterTable =
FILTER(
KEEPFILTERS(VALUES('Date'[WeekStartDate])),
AND(
'Date'[WeekStartDate] >= DATE(2021, 5, 2),
'Date'[WeekStartDate] < DATE(2021, 6, 28)
)
)
VAR __DS0Core =
SUMMARIZECOLUMNS(
'Date'[WeekStartDate],
__DS0FilterTable,
"Variable_1__Weekly_", ('Energy Measures'[Variable 1 (Weekly)],
"Variable___Weekly_", 'Energy Measures'[Variable 2 (Weekly)]
)
VAR __DS0PrimaryWindowed =
TOPN(1001, __DS0Core, 'Date'[WeekStartDate], 1)
EVALUATE
__DS0PrimaryWindowed
ORDER BY
'Date'[WeekStartDate]
This is the table that is returned in Dax Studio.
WeekStartDate | Variable_1 | Variable_2 | ||
| 5/3/2021 12:00:00 AM | 22.3630411414053 | 58.6897356143079 | ||
| 5/10/2021 12:00:00 AM | 23.3670150987224 | 63.2411067193676 | ||
| 5/17/2021 12:00:00 AM | 30.0690392843591 | 63.8531906300485 | ||
| 5/24/2021 12:00:00 AM | 17.0206386292835 | 63.2377049180328 | ||
| 5/31/2021 12:00:00 AM | 32.1746588693957 | 65.5764513491415 | ||
| 6/7/2021 12:00:00 AM | 17.52964237904 | 65.2047913446677 | ||
| 6/14/2021 12:00:00 AM | 18.6889657824227 | 53.2816577129701 | ||
| 6/21/2021 12:00:00 AM | 26.6836760355368 | 64.2135981411817 |
This is how it is returned in Power BI Report Builder
Any Help is greatly appreciate.
- Anonymous5 years ago
Hi moltra ,
Have you checked whether the two data models are consistent? Maybe the relationship between the table and the table is inconsistent?
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
1 Reply
- AnonymousNot applicable
Hi moltra ,
Have you checked whether the two data models are consistent? Maybe the relationship between the table and the table is inconsistent?
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.