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

Preparing for a certification exam? Ask exam experts all your questions on May 15th. Register now.

Reply
DavidQuerol
Frequent Visitor

Total sales with specific filter

Hi, I need to do a Measure with a filter that i'm not guessing how to dot it.
Let's say i have 10 Companies in the dimension table 'Company', then i have the dimension 'Clients' with a column named 'GroupClient' which can be YES or NO and the facts table 'Sales'.

If i create a measure TOTAL SALES = SUM(Sales[Amount]) i'll have all sales from the 10 companies no matter if the client is YES or NO.
If in powerbi I put a filter in the page or objects where i can choose GroupClient YES or NO it filters the 10 companies.

I need to know the total amount of sales where the the client is NO, except for one of those Companies where the client has to be YES and NO. And then i won't need to use a filter in the powerbi page or objects so the total amount of sales will be correct for the 10 companies.

Thanks!

 

1 ACCEPTED SOLUTION

I finally used a measure that sums 2 measures, one without filters and the other with filters, probably not the most efficient but for now it works, thanks for replying anyway.

View solution in original post

3 REPLIES 3
MFelix
Super User
Super User

Hi @DavidQuerol,

 

Without data is difficult to give a correct answer but to what I can understand you want on of your companies that have the YES and NO values on the column Group client and you want to calculate the sum of all no and yes for that customer alonside with all the ones that have no?

 

Is this correct? Dependending on your model there can be made using different measures.

 

Can you please share a mockup data or sample of your PBIX file and expected result. You can use a onedrive, google drive, we transfer or similar link to upload your files.

If the information is sensitive please share it trough private message.


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



I finally used a measure that sums 2 measures, one without filters and the other with filters, probably not the most efficient but for now it works, thanks for replying anyway.

Hi @DavidQuerol 

 

Don't forget to accept the correct answer.


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Helpful resources

Announcements
PBIApril_Carousel

Power BI Monthly Update - April 2025

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

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

Find out what's new and trending in the Fabric community.