Forum Discussion

jamesveron's avatar
jamesveron
Frequent Visitor
6 years ago

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

  • jamesveron , Try a new measure like

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

    • jamesveron's avatar
      jamesveron
      Frequent Visitor

      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