Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Calculate Filter Ignoring in Table visual

Hi Guys,

 

 

 

My current measure = 

USOnlineLevel1 = CALCULATE(
                                                Sales[Sales Amount],
                                                Sales[SalesStore] = "Contoso North America Online Store",
                                                Customer[Education] = "Bachelors" ||
                                                 Customer[Education]= "Graduate Degree")
 
As you can see here below on the column USOnlineLevel1 that customer 671  there are unnecessary values of 889.00 (for High School, Graduate Degree, Partial College and Partial High School). Based on this measure i expect only one value of 889.00 in the Bachelor. 
 
How can i avoid ignore the filtered values? I only want to return the value of Contoso North America Online Store and Education = Bachelors and Graduate Degree...
 
Many Thanks
 
 





  • Hi Anonymous,

     

    If you write a formula like that, the context of Customer[Education] is overridden. So all the rows have values now. Please try a formula like below. 

     

    USOnlineLevel1 =
    CALCULATE (
        Sales[Sales Amount],
        Sales[SalesStore] = "Contoso North America Online Store",
        FILTER (
            Customer,
            Customer[Education] = "Bachelors"
                || Customer[Education] = "Graduate Degree"
        )
    )
    

     

    Best Regards,
    Dale

  • Hi Anonymous,

     

    Could you please mark the proper answers as solutions?

     

     

    Best Regards,

3 Replies

  • v-jiascu-msft's avatar
    v-jiascu-msft
    Microsoft Employee

    Hi Anonymous,

     

    If you write a formula like that, the context of Customer[Education] is overridden. So all the rows have values now. Please try a formula like below. 

     

    USOnlineLevel1 =
    CALCULATE (
        Sales[Sales Amount],
        Sales[SalesStore] = "Contoso North America Online Store",
        FILTER (
            Customer,
            Customer[Education] = "Bachelors"
                || Customer[Education] = "Graduate Degree"
        )
    )
    

     

    Best Regards,
    Dale

  • v-jiascu-msft's avatar
    v-jiascu-msft
    Microsoft Employee

    Hi Anonymous,

     

    Could you please mark the proper answers as solutions?

     

     

    Best Regards,