cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
muren Frequent Visitor
Frequent Visitor

Filtering Data

I want to add a calculated column where I have a filter on. This is in the sales targets table. How can I add a filter which filters on city with the ordval from the sales table?  I want to sum the ordval bases on the city from the sales targets table and the month. How do I do that? I figured out that calculating just the cities would need this formula: 
Sales 2016 = CALCULATE(SUM(Sales[ordval]))enter image description here
 
1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Filtering Data

HI, @muren

After my test, you could try this way:

Step1:

Add a Month NO column for sales targets table, because Month column in sales targets table can't match with Month column in sales table.

 

2018120310

 

Step2:

Change the cross filter direction to Both 

2018120311

 

Step3:

Use this formula to create a calculate column

Column = CALCULATE(SUM(Sales[ordval]),FILTER(Sales,Sales[Month]='Sales Targets'[Month NO]))+0

 

Best Regards,

Lin

 

 

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

Re: Filtering Data

Hey,

 

please create a pbix file that contains some sample data, and the reflects your data model, upload the file to ondrive or dropbox and share the link.

 

Regards,

Tom

Hamburg - Germany
If I answer you question, please mark my post as solution, this will also help others.
Proud to be a Datanaut!
muren Frequent Visitor
Frequent Visitor

Re: Filtering Data

Community Support Team
Community Support Team

Re: Filtering Data

HI, @muren

After my test, you could try this way:

Step1:

Add a Month NO column for sales targets table, because Month column in sales targets table can't match with Month column in sales table.

 

2018120310

 

Step2:

Change the cross filter direction to Both 

2018120311

 

Step3:

Use this formula to create a calculate column

Column = CALCULATE(SUM(Sales[ordval]),FILTER(Sales,Sales[Month]='Sales Targets'[Month NO]))+0

 

Best Regards,

Lin

 

 

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