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
ZachPLPI
Frequent Visitor

How to filter by customers that added a sales type

I am trying to figure out how to filter a visualization by only customers that added a new sales type. My columns are client, sales $, sales type, year. I only want the clients that went from 1 to 2 types, 1 to 3 types, or 2 to 3 types. I know how I would do it in excel. I would say countifs(or(sales type = Sales Type A, Sales Type = Sales Type B, sales type = Sales Type C), year = 2017),1,0). Then I would do the var between 2017 and 2018 and say if 2017 > 0 and 2018 count - 2017 count > 0, Then result. 

 

I am lost on how to do that with DAX. 

3 REPLIES 3
PaulDBrown
Community Champion
Community Champion

Could you please provide a sample dataset or PBIX file, and a depiction of the expected output? Thanks





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






The error message "PBIX file is not supported" popped up. But I can manually write that out.

 

Customer Name          Sales Type               Year              Sales

A High                          Type A                    2017             100

A High                          Type A                    2018             100

A High                          Type B                    2018              50

B High                          Type A                    2017              50

B High                          Type A                    2018              50

B High                          Type A                    2019              50

 

So I want to be able to show the total sales per sales type by year for clients like Client A (Added a sales type) and client B (Did not add a sales type).

Hi @ZachPLPI ,

 

Would you please show us the expected output based on your sample data?

 

Best Regards,

Dedmon Dai

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.