cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
regasanyoto Member
Member

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
 
 
2019-01-07 00_04_10-Introduction to DAX - Power BI Desktop.png




2 ACCEPTED SOLUTIONS

Accepted Solutions
v-jiascu-msft Super Contributor
Super Contributor

Re: Calculate Filter Ignoring in Table visual

Hi @regasanyoto,

 

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

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

v-jiascu-msft Super Contributor
Super Contributor

Re: Calculate Filter Ignoring in Table visual

Hi @regasanyoto,

 

Could you please mark the proper answers as solutions?

 

 

Best Regards,

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
Super User
Super User

Re: Calculate Filter Ignoring in Table visual

Hi,

 

Share the link from where i can download your PBI file.

v-jiascu-msft Super Contributor
Super Contributor

Re: Calculate Filter Ignoring in Table visual

Hi @regasanyoto,

 

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

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

v-jiascu-msft Super Contributor
Super Contributor

Re: Calculate Filter Ignoring in Table visual

Hi @regasanyoto,

 

Could you please mark the proper answers as solutions?

 

 

Best Regards,

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
Can You Solve These Challenge

Challenge: Can You Solve These?

Find out how to participate in the first Power BI 'Can You Solve These?' challenge.

Community News & Announcements

Community News & Announcements

Get your latest community news and announcements.

Virtual Launch Event

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Community Kudopalooza

Win Power BI Swag with Community Kudopalooza!

Each week, complete activities and be qualified in the drawing for cool Power BI Swag.

Users Online
Currently online: 396 members 3,564 guests
Please welcome our newest community members: