Forum Discussion

RubenMerino's avatar
RubenMerino
Frequent Visitor
3 years ago
Solved

Distinc count grup by specific column

Hi

 

I have a table with columns: ID, Order sale and Product.

 

I need a mesure than count the number of Order sale that have iqual or more than 2 product.

The photo of down resum the idea between the table, dynamic table and the mesure that count the number of order sale greater than 2.

 





  • Hi,

     

    try this measure:

     

    Measure = var flag = CALCULATE(COUNT('Table'[Order Sale]))>=2
    return
    if(flag=TRUE(),CALCULATE(DISTINCTCOUNT('Table'[ID])),0)
     

     

    If I answered your question, please mark my post as solution, Appreciate your Kudos 👍

1 Reply

  • DOLEARY85's avatar
    DOLEARY85
    Icon for Resident Rockstar rankResident Rockstar

    Hi,

     

    try this measure:

     

    Measure = var flag = CALCULATE(COUNT('Table'[Order Sale]))>=2
    return
    if(flag=TRUE(),CALCULATE(DISTINCTCOUNT('Table'[ID])),0)
     

     

    If I answered your question, please mark my post as solution, Appreciate your Kudos 👍