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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

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
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors