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
Tschwenn
Helper I
Helper I

Flagging duplicate values to produce a slicer

Salesforce creates a "Opportunity_Name__c" field for every Master Opportunity.

Thus, if we have 10 Master Opportunites = 10 different values for "Opportunity_Name__c"


But 1 of the Master Opportunities may have 4 Sub-Opportunities, if 4 different Business Units are involved [see screenshot 1]

 

I'm looking to be able to identify which of our Master Opportunities have multiple Sub-Opportunities - so that I may apply a slicer and populate a Card (to count the # of Master Opportunities that have more than a single instance of that value) AND therefore populate a table with those Opportunity details [screenhot 2]

 

  • Should I create a new Measure or a new Column?
  • What is the formula I can build to flag something like "Multi-Agency Opportunity?
  • PowerBI-Multi-OppNames.pngPowerBI-Multi-OppNames2.png"
2 REPLIES 2
v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @Tschwenn ,

You could try the measure like below.

Measure =
CALCULATE (
    COUNT ( 'tablename'[Opportunity_name_Text_c] ),
    ALLEXCEPT ( 'Tablename', 'Tablename'[Opportunity_name_c] )
)
Check_Multi_Agency Opp = IF ( [measure] > 1, "Yes", "No" )

If you still need help, please share your sample data in text-tabular format in addition to (or instead of)  screen captures. That allows people trying to help to readily copy the data and run a quick test, plus it increases the likelihood of your question being answered. Just use 'Copy table' in Power BI and paste it here. Or, ideally, share the pbix (beware of confidential data).

Best  Regards,

Cherry

 

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi Cherry,
Thank you! I tweaked one of the formulas - and have been able to get the desired result [screenshots 1].

 

However, I believe because both are "Measures" I cannot use the YES/NO measure as a slicer. PowerBI doesn't allow me to drag it over to the Field section [screenshot 2]

 

I want to be able to show a COUNT of all the YES results [similar to what you see in screenshot 3]

 

Here are the formulas currently in place which return the correct results. But again, I want to be able to use a slicer for the "Multi-PH Agency Opp?" measure similar to what you see in Screenshot 2:

 

Multi-PH Agency Opp? = IF ([Multi-PH Agency Opp-COUNT]> 1, "Yes", "No" )
Multi-PH Agency Opp? COLUMN = IF ([Multi-PH Agency Opp-COUNT]> 1, "Yes", "No" )

PowerBI-Multi-OppNames1a.png

 

PowerBI-Multi-OppNames1c.png

PowerBI-Multi-OppNames1b.png

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.

Top Solution Authors
Top Kudoed Authors