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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
harshadrokade
Post Partisan
Post Partisan

DAX filter help needed

Hi,

 

I have table as Vendordata (See at bottom). There is other table which has Vendor names as well (Vendorlist) & a slicer is created based on Vendor name from Vendorlist table. Vendordata & Vendorlist tables are connected with each other with Vendor name only.

 

I have created a card visual & I want to see how many clients using selected vendor in slicer as Secondary vendor. 

E.g. If I select ABC4 in the slicer, I want the card visual to show count as 4 becasue there are 4 clients using it as Secondary vendor. If I select ABC6 in the slicer, I want the card visual to show count as 3.

 

I have created a dax but since two tabes connected with Vendor name only & I have slicer as Vendor name, it is filtering the table & showing count as blank. Pls help sir.

 

MS-original1 = if (ISFILTERED ('Vendirlist'[Vendor name]),CALCULATE(COUNT('Vendordata'[Secondary Vendor]),ALLEXCEPT('Vendordata','Vendordata'[Secondary Vendor]),'Vendordata'[Secondary Vendor]=SELECTEDVALUE('Vendorlist'[Vendir name])),"NA")

 

Table Vendordata-

Client IDVendorSecondary VendorServiceService used?
1ABC1ABC4XYZ1Yes
2ABC1ABC4XYZ1Yes
3ABC1ABC4XYZ1Yes
4ABC1ABC4XYZ2Yes
5ABC4ABC5XYZ2Yes
6ABC4ABC5XYZ3Yes
7ABC5ABC6XYZ3 Yes
8ABC2ABC6XYZ3No
9ABC7ABC6XYZ3No

 

1 ACCEPTED SOLUTION
AlexisOlson
Super User
Super User

Does this work?

 

MS-original1 =
VAR SelectedVendor = SELECTEDVALUE ( 'Vendorlist'[Vendor name] )
RETURN
    CALCULATE (
        COUNT ( 'Vendordata'[Secondary Vendor] ),
        ALL ( 'Vendorlist' ),
        'Vendordata'[Secondary Vendor] = SelectedVendor
    )

View solution in original post

4 REPLIES 4
AlexisOlson
Super User
Super User

Does this work?

 

MS-original1 =
VAR SelectedVendor = SELECTEDVALUE ( 'Vendorlist'[Vendor name] )
RETURN
    CALCULATE (
        COUNT ( 'Vendordata'[Secondary Vendor] ),
        ALL ( 'Vendorlist' ),
        'Vendordata'[Secondary Vendor] = SelectedVendor
    )

Thanks a lot sir. Appreciate your help.

harshadrokade
Post Partisan
Post Partisan

HI @Ashish_Mathur  Can youp pls help me on above. Its the smilar table for which you helped me on last query.

Hi,

Transform data the way i did in the previous question.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors