Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Employee
Employee

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.