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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Alicia83B
Helper I
Helper I

Adding an additional FILTER to my measure

Below is my current measure for Distributor Activity Count. I would like to add three specific Manufacturers to show Distributor Activity Count for in this measure. I have been looking for something similar to help me with this, but have not found anything. 

 

Manufactuters would be 1, 2, 3

 

Dist Activity Count =
COUNTX (
    FILTER (
        Activity,
        Activity[activitytype]
            IN ( {
            "Distributor Business Review",
            "Distributor Sales Call",
            "Distributor Business Planning",
            "DSR Training",
            "Opportunity Follow Up",
            "Pricing / Order Management",
            "Quote Opportunity / Cross Reference",
            "Sales Meeting",
            "Send Samples / Literature",
            "Trade Show / Open House",
            "Work with DSR"
        )
    ),
    Activity[ActivityIDKey]
)
 
Any help is much appreciated. 
 
Thank you.
4 REPLIES 4
Anonymous
Not applicable

Hi @Alicia83B ,

In order to better understand your demands and give the right solution, could you please provide some more specific information? such as your desensitized example data and a screenshot of your desired results?

Thanks for your efforts & time in advance.

 

Best regards,
Community Support Team_ Binbin Yu

Good morning @Anonymous 

 

Below is a snapshot of the KPI data and result I am looking for. I already have the measure for the Activity Types as listed in my original post. The KPI is have the Activity Types I have captured in the measure only show in the gauge visualization if the Manufacturers are AI, SS, and FB. When I tried the solution provided it does not work. I am trying to see if I can add a Manufacturer to my measure already created, or if I should create another measure referencing the original measure capturing the Activity Types.

I hope I have explained this well. I am still getting familiar with PBI and how to express exactly what I am looking for in terms that are understandable. Thank you.

 

Start DateEnd DateKPI NameKPI DescriptionGoalKPI TypeManufacturerActivity Types
9/1/202212/31/2022National FocusAI, SS, and FB  EU / Distributor Activities30EU/ Dist ActivitiesAI, SS, FBDistributor Business Meeting, Distributor Sales Call, Distributor Business Planning, End User Sales Call, End User Business Retention, End User Training, DSR Training, Opportunity Follow Up, Pricing / Order Management, Quote Opportunity / Cross Reference, Sales Meeting, Send Sample / Literature, Trade Show / Open House, Work with DSR


Capture.PNG

PabloDeheza
Solution Sage
Solution Sage

Hi there!

To add filters on a FILTER statement you can use &&. So in your code you can add a new filter using && after closing the IN bracket.

Dist Activity Count =
COUNTX (
    FILTER (
        Activity,
        Activity[activitytype]
            IN ( {
            "Distributor Business Review",
            "Distributor Sales Call",
            "Distributor Business Planning",
            "DSR Training",
            "Opportunity Follow Up",
            "Pricing / Order Management",
            "Quote Opportunity / Cross Reference",
            "Sales Meeting",
            "Send Samples / Literature",
            "Trade Show / Open House",
            "Work with DSR"
        )

&& Manufacturer IN { 1, 2, 3 }

    ),
    Activity[ActivityIDKey]
)

 

Let me know if that helps!

 

@PabloDeheza  This did not work for me. When I add the && Manufacturer, Manufacturer is not showing in the list for me to select. Manuafcturer is only showing the fields in Activity table. Is there anther way I can write this that will allow the Manufaacturer table to show in the list for me to set the field I wantt to bring into the measure?

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.