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
Anonymous
Not applicable

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

HI, @Anonymous

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.

View solution in original post

3 REPLIES 3
TomMartens
Super User
Super User

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



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany
Anonymous
Not applicable

HI, @Anonymous

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.

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.