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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
koray
Helper V
Helper V

Special Calculation in Measure

Hello,

 

I have a table like the one below.

 

koray_0-1601556121025.png

 

 

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 { "" })

 

koray_1-1601556275186.png

It gives me 19, and this number is correct.

 

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

 

koray_2-1601556426204.png

 

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

1 ACCEPTED SOLUTION
Daviejoe
Memorable Member
Memorable Member

This should work for you

 

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




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

3 REPLIES 3
Daviejoe
Memorable Member
Memorable Member

This should work for you

 

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




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Thank you so much.

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

 

Have a great day!





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.