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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
SylvainHG
Regular Visitor

Help in filtering data

Dear community,

 

I'm using a set of data from customers that i upload in a SQL database and I need help to analyse.

 

I'd like to use the data of customers if they use at least 2 differents products (column names ID_product) to get a straight comparison between these 2 products. 

And i'd like also to use these data only if they used the product 5 times (5 differents rows in my table). 

 

Example, if:

Customer1 : use the 2 products 6 times in the year

Customer2 : use only 1 product 10 times in the year

Customer3 : use the 2 products 3 times in the year

 

I only want to see (and analyse) data from customer1 ... i hope it's clear enought 😅

1 ACCEPTED SOLUTION
Alican_C
Resolver II
Resolver II

Hi,

 

Create a calculated column to count the number of distinct products each customer has used:

ProductCount = CALCULATE( DISTINCTCOUNT(CustomerData[ID_product]), ALLEXCEPT(CustomerData, CustomerData[CustomerID]) )

 

Create another calculated column to count the total number of usages for each customer:

UsageCount =
CALCULATE(
COUNT(CustomerData[UsageDate]),
ALLEXCEPT(CustomerData, CustomerData[CustomerID])
)

 

Create a calculated column to identify customers who meet both criteria (using at least 2 different products and having at least 5 usages):

 

IsQualified =
IF(
[ProductCount] >= 2 && [UsageCount] >= 5,
1,
0
)

You can now use this IsQualified column to filter your visuals. For example, if you are creating a table or chart, you can add a visual-level filter to only include rows where IsQualified is 1.

 

 

View solution in original post

1 REPLY 1
Alican_C
Resolver II
Resolver II

Hi,

 

Create a calculated column to count the number of distinct products each customer has used:

ProductCount = CALCULATE( DISTINCTCOUNT(CustomerData[ID_product]), ALLEXCEPT(CustomerData, CustomerData[CustomerID]) )

 

Create another calculated column to count the total number of usages for each customer:

UsageCount =
CALCULATE(
COUNT(CustomerData[UsageDate]),
ALLEXCEPT(CustomerData, CustomerData[CustomerID])
)

 

Create a calculated column to identify customers who meet both criteria (using at least 2 different products and having at least 5 usages):

 

IsQualified =
IF(
[ProductCount] >= 2 && [UsageCount] >= 5,
1,
0
)

You can now use this IsQualified column to filter your visuals. For example, if you are creating a table or chart, you can add a visual-level filter to only include rows where IsQualified is 1.

 

 

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.