Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Special Calculation in Measure

Hello,

 

I have a table like the one below.

 

 

 

I calculate some numbers by filtering with the measure I write here.

 

As an example, I take with the following measure how many UD code columns are empty.

 

PF Order Sayısı =
CALCULATE(COUNTA('Sheet1'[Order]), 'Sheet1'[UD code] IN { "" })

 

It gives me 19, and this number is correct.

 

But there are 2 of them in the same order number in my table. 

 

 

I want it to count 1 time with the same order numbers in my measure. So my total result should be 17. How can I do that?

 

Regards,

Koray

  • This should work for you

     

    Countdist =
    CALCULATE(DISTINCTCOUNT('Sheet1'[Order]), 'Sheet1'[UD code] = "")
     
     

3 Replies

  • Daviejoe's avatar
    Daviejoe
    Icon for Memorable Member rankMemorable Member

    This should work for you

     

    Countdist =
    CALCULATE(DISTINCTCOUNT('Sheet1'[Order]), 'Sheet1'[UD code] = "")
     
     
    • Anonymous's avatar
      Anonymous
      Not applicable

      Thank you so much.

      • Daviejoe's avatar
        Daviejoe
        Icon for Memorable Member rankMemorable Member

        Anonymous More than happy to help, glad it gave you what you needed.

         

        Have a great day!