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

Helpful resources

Announcements
August 2022 update 768x460.jpg

Check it Out!

Click here to learn more about the August 2022 updates!

August 1 episode 9_no_dates 768x460.jpg

The Power BI Community Show

Watch the playback when Priya Sathy and Charles Webb discuss Datamarts! Kelly also shares Power BI Community updates.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Top Solution Authors
Top Kudoed Authors