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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
jamesveron
Frequent Visitor

Filter by count distinct value

Hi,

I have Customers that have 1 or more contracts in one or more countries.


I would like to filter all my visuals based on a set min value of contract each customer has. To see what are my stats for all customers, VS the stats for customers that have at least 2 contracts etc …

 

Example of data set
Customer ID / Customer Name / Country / Contract ID / Region / Value / Product Name

 

Any help would me much appreciated.

2 REPLIES 2
amitchandak
Super User
Super User

@jamesveron , Try a new measure like

countx(filter(summarize(Table,Table[customer ID],"_1", distinctCOUNT(Table[contract Id])),[_1]>=2),[customer])

@amitchandak 

thanks but I cannot add this nes measure to the "Filters on all pages"

and why once use Customer ID and the other Customer? could we not use only customer (name)?

Regards

 

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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