You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Within AdventureWorks, if you run the following query and add 'Date' as a table in the Watch Window, it will generate the DAX query below which is invalid.
// DAX Query
DEFINE
VAR __DS0Core =
SUMMARIZECOLUMNS(
ROLLUPADDISSUBTOTAL('Date'[Calendar Year], "IsGrandTotalRowTotal"),
"Internet_Total_Sales", 'Internet Sales'[Internet Total Sales]
)
VAR __DS0PrimaryWindowed =
TOPN(502, __DS0Core, [IsGrandTotalRowTotal], 0, 'Date'[Calendar Year], 1)
EVALUATE
__DS0PrimaryWindowed
ORDER BY
[IsGrandTotalRowTotal] DESC, 'Date'[Calendar Year]
It appears to double up portions of the query. If I delete the code from the first EVALUATE to just before the second EVALUATE, it works.
---------Invalid Generated DAX for the 'Date' table
// DAX Query
DEFINE
VAR __DS0Core =
SUMMARIZECOLUMNS(
ROLLUPADDISSUBTOTAL('Date'[Calendar Year], "IsGrandTotalRowTotal"),
"Internet_Total_Sales", 'Internet Sales'[Internet Total Sales]
)
VAR __DS0PrimaryWindowed =
TOPN(502, __DS0Core, [IsGrandTotalRowTotal], 0, 'Date'[Calendar Year], 1)
EVALUATE // DAX Query
DEFINE
VAR __DS0Core =
SUMMARIZECOLUMNS(
ROLLUPADDISSUBTOTAL('Date'[Calendar Year], "IsGrandTotalRowTotal"),
"Internet_Total_Sales", 'Internet Sales'[Internet Total Sales]
)
VAR __DS0PrimaryWindowed =
TOPN(502, __DS0Core, [IsGrandTotalRowTotal], 0, 'Date'[Calendar Year], 1)
Within AdventureWorks, if you run the following query and add 'Date' as a table in the Watch Window, it will generate the DAX query below which is invalid.
// DAX Query
DEFINE
VAR __DS0Core =
SUMMARIZECOLUMNS(
ROLLUPADDISSUBTOTAL('Date'[Calendar Year], "IsGrandTotalRowTotal"),
"Internet_Total_Sales", 'Internet Sales'[Internet Total Sales]
)
VAR __DS0PrimaryWindowed =
TOPN(502, __DS0Core, [IsGrandTotalRowTotal], 0, 'Date'[Calendar Year], 1)
EVALUATE
__DS0PrimaryWindowed
ORDER BY
[IsGrandTotalRowTotal] DESC, 'Date'[Calendar Year]
It appears to double up portions of the query. If I delete the code from the first EVALUATE to just before the second EVALUATE, it works.
---------Invalid Generated DAX for the 'Date' table
// DAX Query
DEFINE
VAR __DS0Core =
SUMMARIZECOLUMNS(
ROLLUPADDISSUBTOTAL('Date'[Calendar Year], "IsGrandTotalRowTotal"),
"Internet_Total_Sales", 'Internet Sales'[Internet Total Sales]
)
VAR __DS0PrimaryWindowed =
TOPN(502, __DS0Core, [IsGrandTotalRowTotal], 0, 'Date'[Calendar Year], 1)
EVALUATE // DAX Query
DEFINE
VAR __DS0Core =
SUMMARIZECOLUMNS(
ROLLUPADDISSUBTOTAL('Date'[Calendar Year], "IsGrandTotalRowTotal"),
"Internet_Total_Sales", 'Internet Sales'[Internet Total Sales]
)
VAR __DS0PrimaryWindowed =
TOPN(502, __DS0Core, [IsGrandTotalRowTotal], 0, 'Date'[Calendar Year], 1)
EVALUATE CALCULATETABLE('Date',TREATAS({2014},'Date'[Calendar Year]))
The text was updated successfully, but these errors were encountered: