cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Distinctcount Column added Measures

I am trying to add two calculated measure that have DISTINCTCOUNT of [Staff ID] on both calculated measures. 

[Measure 1] and [Measure 2]

I am trying to add the two measures but keep the Distintcount of [Staff ID].

Currently I am adding [Measure 1] + [Measure 2]  and getting a grand total

but there are multiple instances of the same [Staff ID] as opposed to distinctcount of the Staff ID, any Suggestion on how to keep the [Staff ID] unique 

1 REPLY 1
Anonymous
Not applicable

You have a couple of deisng patterns you can use.

 

1) Use the existing measures to drive the logic in a new measure.  This can work but you might not get the best performance:

CALCULATE
(
	DISTINCTCOUNT([Staff Id])
	,FILTER(VALUES([Staff Id]),NOT ISBLANK([Measure 1]))
	,FILTER(VALUES([Staff Id]),NOT ISBLANK([Measure 2]))
)

2) Create a third measure that combine the logic of measure 1 and 2:

CALCULATE
(
	DISTINCTCOUNT([Staff Id])
	,<Logic Measure 1>
	,<Logic Measure 2>
)

 

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

November Power BI Update 768x460.png

Check it Out!

Click here to read more about the November 2021 Updates!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.