cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ryan-gao
Helper III
Helper III

qusetion about context overwrite

snipaste_20180207_123106.png

my question:
The evaluation of filter context happens and came into data model with its final result ,after that the first parameter of calculate was evaluated.
so even if  “apple, electric”  in test3 has no product, because in this step filter context is not yet came into model, it was immediately overwrite to "tv,electric" in the calculate function,  i think it should return the same result as test1
 
Am i miss something? wish you can understand my description
 
thanks
1 ACCEPTED SOLUTION

thanks to @Phil_Seamark and @Marco

 

i think the answer is AutoExists:"the engine performs a first step in which it determines existing
combinations and only later it computes the effective values"  this will happen before the evaluation of filter context

View solution in original post

5 REPLIES 5
Phil_Seamark
Microsoft
Microsoft

HI @ryan-gao

 

Your pivot table in Test3 is showing a 1 in the cell for TV and Electric, so it's looking fine.


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

@Phil_Seamark thanks for the reply ,what confused me  is the red box of the pivot table, i think it should also return 1 

HI @ryan-gao

 

Your dataset consists of three rows and you have no rows with both Apple AND Electric.  Filter context is accumulative and applies a logical AND, so only rows that meet every condition will be returned to the COUNT function.


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

Thanks @Phil_Seamark

as you said,if  the filter context is accumulative, then the left measure test1 's outer filter context is same with the red box on the right,which stimulates test3 's pivot environment.

 

although  "apple, electric" return no rows, test1 's filter context was overwrite to "tv , electric" by inner filter context. why this can happens on test1 , not test3,  I‘m a bit confused

 

thanks

thanks to @Phil_Seamark and @Marco

 

i think the answer is AutoExists:"the engine performs a first step in which it determines existing
combinations and only later it computes the effective values"  this will happen before the evaluation of filter context

View solution in original post

Helpful resources

Announcements
Power BI December 2021 Update_carousel 768x460.jpg

Check it Out!

Click here to read more about the December 2021 Updates!

User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Jan 2022 Dev Camp 768x460 copy.png

Power BI Dev Camp- January 27th, 2022

Mark your calendars and join us for our next Power BI Dev Camp!

Top Solution Authors
Top Kudoed Authors