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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch 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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.