Forum Discussion
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.
Table Vendordata-
| Client ID | Vendor | Secondary Vendor | Service | Service used? |
| 1 | ABC1 | ABC4 | XYZ1 | Yes |
| 2 | ABC1 | ABC4 | XYZ1 | Yes |
| 3 | ABC1 | ABC4 | XYZ1 | Yes |
| 4 | ABC1 | ABC4 | XYZ2 | Yes |
| 5 | ABC4 | ABC5 | XYZ2 | Yes |
| 6 | ABC4 | ABC5 | XYZ3 | Yes |
| 7 | ABC5 | ABC6 | XYZ3 | Yes |
| 8 | ABC2 | ABC6 | XYZ3 | No |
| 9 | ABC7 | ABC6 | XYZ3 | No |
Does this work?
MS-original1 = VAR SelectedVendor = SELECTEDVALUE ( 'Vendorlist'[Vendor name] ) RETURN CALCULATE ( COUNT ( 'Vendordata'[Secondary Vendor] ), ALL ( 'Vendorlist' ), 'Vendordata'[Secondary Vendor] = SelectedVendor )
4 Replies
- AlexisOlsonSuper User
Does this work?
MS-original1 = VAR SelectedVendor = SELECTEDVALUE ( 'Vendorlist'[Vendor name] ) RETURN CALCULATE ( COUNT ( 'Vendordata'[Secondary Vendor] ), ALL ( 'Vendorlist' ), 'Vendordata'[Secondary Vendor] = SelectedVendor )- harshadrokadePost Partisan
Thanks a lot sir. Appreciate your help.
- harshadrokadePost Partisan
HI Ashish_Mathur Can youp pls help me on above. Its the smilar table for which you helped me on last query.
- Ashish_MathurSuper User
Hi,
Transform data the way i did in the previous question.