Consider the following linked table, called 'SomeData'.Country Product OtherAttributeUSA A YFRA B YUSA C NFRA C NUK A NGER B NUSA A NFRA B NThe following query returns the correct results:EVALUATE CALCULATETABLE( CALCULATETABLE( VALUES('SomeData') , ALL('SomeData'[OtherAttribute]) ) , FILTER( 'SomeData', [OtherAttribute] = "Y") )These results are the ones I expect: all data for which (Country, Product) exists in FILTER( 'SomeData', [OtherAttribute] = "Y").The following query returns incorrect results:EVALUATE CALCULATETABLE( CALCULATETABLE( 'SomeData' , ALL('SomeData'[OtherAttribute]) ) , FILTER( 'SomeData', [OtherAttribute] = "Y") )This query returns all data for which Product exists in FILTER( 'SomeData', [OtherAttribute] = "Y") - confirmed by SQL Server Profiler. This does not make sense.Worse, if the order of my columns were Product, Country, OtherAttribute. Then the same query would return different results - all data for which Country exists in FILTER( 'SomeData', [OtherAttribute] = "Y") Note the only difference in both queries that VALUES('SomeData') was replaced with 'SomeData'.In other words, modifying only the expression within the innermost CALCULATETABLE statement, changed the way the outer context was calculated.
Product Language
Version
Category
Operating System
Operating System Language
Steps to Reproduce
Actual Results
Expected Results
Platform
Virtualization
Please wait...