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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Adairene
Frequent Visitor

A Calculated Column for Cross-Business Opportunity Distinct Count - HELP!

Hello!

 

A simple problem, but cannot wrap my head around it - could somebody please help? What is the correct DAX formula for the "Cross-Business Opportunity Distinct Count"? Thank you!

 

Adairene_0-1616671396406.png

 

1 ACCEPTED SOLUTION
v-yangliu-msft
Community Support
Community Support

Hi  @Adairene ,

Here are the steps you can follow:

1. Create measure.

Measure =
CALCULATE(DISTINCTCOUNT('Table'[Opportunity Owner Business]),FILTER(ALL('Table'),'Table'[Opportunity]=MAX('Table'[Opportunity])))

2. Result.

v-yangliu-msft_0-1617008847165.png

v-yangliu-msft_1-1617008847169.jpeg

 

You can downloaded PBIX file from here.

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
v-yangliu-msft
Community Support
Community Support

Hi  @Adairene ,

Here are the steps you can follow:

1. Create measure.

Measure =
CALCULATE(DISTINCTCOUNT('Table'[Opportunity Owner Business]),FILTER(ALL('Table'),'Table'[Opportunity]=MAX('Table'[Opportunity])))

2. Result.

v-yangliu-msft_0-1617008847165.png

v-yangliu-msft_1-1617008847169.jpeg

 

You can downloaded PBIX file from here.

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@Adairene , how is Cross-Business Opportunity Distinct Count is defined. what logic behind 2 and 1

Hello @amitchandak,

 

The definition is that it should count the unique occurences of a "Opportunity Owner Business" under each "Opportunity". Are you able to help with this?

StefanoGrimaldi
Resident Rockstar
Resident Rockstar

hey, 

 for what I could understand you dont even need a DAX if you want to get how many times a busness owner appears just add that field in the table with the owner busnees and change the agregation option on the visual field section to count (this will count how many times that value for ASR for example in row 1 appears with the combination of DEQPT--PERSON A -- ASR )

 

since the visual will do the filtering in that format. 

 

if this helped give some kudos, if this solves your question please mark as solution for others to find it.





Did I answer your question? Mark my post as a solution! / Did it help? Give some Kudos!

Proud to be a Super User!




Hello @StefanoGrimaldi,

 

I could do this, but then when I have a report in which there is a slicer based on the column "Opportunity Owner" and one person is selected, the distinct count is incorrect since it should always be based on the whole data (even when only one person is filtered on the report). So for example for the person C should show "2" for the opportunity HTOEL, not "1".

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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