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

Sales Calculation to ignore filters

Hi Experts

 

I am trying to work out a sales rate calculation that ignores filters. so here is the scenario.

I have 4 filters (Region, Country, Site and Department) the columns used for the filters come from 4 tables.

I am using the following DAX

Sales Y2 = CALCULATE([Sales],
ALL(PMS_PARTS[DEPARTMENT]),ALL(PMS_COMPLAINT[MANUFACTURING_REGISTERED_SITE]),All(PMS_COUNTRY[MDR_REPORTING_REGION]),
PMS_TM1_SALES_VOLUME[Fiscal Period] = "Y"
)
This formula works fine, it ignore the filter for Region, Site and Department, and gives me the correct sales for country UK £4m. 
This issue is when only UK is selected as a filter i would except my Sales Rate calculation to be = Divide(the number of issues/sales for UK). However, the above formula is giving me the sales assoicated with the individual issues / the sales for the issues (as opposed to the total UK Sales)
 
I want to be able to divide the issue by total sales..... 

 

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi Amit

 

I worked the solution based on your help

Sales Y = CALCULATE([Sales],
ALL(PMS_COMPLAINT[REPORTED_FAILURE_MD_CD]),ALL(PMS_PARTS[PMS_FILE]),ALL(PMS_COMPLAINT[MANUFACTURING_REGISTERED_SITE]),All(PMS_COUNTRY[MDR_REPORTING_REGION]),
PMS_TM1_SALES_VOLUME[Fiscal Period] = "Y"
)

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@Anonymous ,

I did not get it completely . Need better examples and data.

 Sales Y2 = if( firstnonbank(table[Country],blank())="UK",Divide([Issue]/[sales]),CALCULATE([Sales],
ALL(PMS_PARTS[DEPARTMENT]),ALL(PMS_COMPLAINT[MANUFACTURING_REGISTERED_SITE]),All(PMS_COUNTRY[MDR_REPORTING_REGION]),
PMS_TM1_SALES_VOLUME[Fiscal Period] = "Y")
)

 

Anonymous
Not applicable

Hi Amit

 

I worked the solution based on your help

Sales Y = CALCULATE([Sales],
ALL(PMS_COMPLAINT[REPORTED_FAILURE_MD_CD]),ALL(PMS_PARTS[PMS_FILE]),ALL(PMS_COMPLAINT[MANUFACTURING_REGISTERED_SITE]),All(PMS_COUNTRY[MDR_REPORTING_REGION]),
PMS_TM1_SALES_VOLUME[Fiscal Period] = "Y"
)

@Anonymous , Thanks for sharing.  Kudos!!

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.