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

Try your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join now

Reply
Anonymous
Not applicable

Filter All on 2 columns DAX

Hi All,

 

Scenarion

 

I have the following data

  • a list of vendors 
    • Some work in the same industry so I want to do a peer comparison
  • vendor score 1-10
  • median measure for vendor score
  • vendor industry

I want to show how a selected (drill through on a single vendor) vendor compares to there peers in the same industry and location by postcode.

 

I was playing around with the following DAX, which I know has too few arguments and doesn't work.....

 

 

 

 

Vendor Peer Comparison = 
CALCULATE(
    [Median Vendor Score],
    FILTER(
        ALL( 'VendorTable'[vendor_industry], 'VendorTable'[vendor_postcode])))

 

 

 

 

I want to be able to visualize, this is score of the vendor that you are currently looking at is and this is where all other vendors within the same postcode and industry are scored

 

Sample Data

VendorVednor ScoreVendor IndustryPostcodeState
Computer Share3Technology3000VIC
Computers Now2Technology3000VIC
A J Builders3Construction4000QLD
Training Solution1Training2000NSW
Informa2Training2000NSW
Salesforce5Technology3000VIC

 

 

any ideas how I could achieve this in a dynamic way?

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Vendor Peer Comparison = CALCULATE(MEDIANX(VendorTable, VendorTable[Vendor_score] ),ALLEXCEPT(VendorTable, VendorTable[vendor_industry], VendorTable[vendor_postcode]))

View solution in original post

4 REPLIES 4
amitchandak
Super User
Super User

@Anonymous , Try allexcept

Vendor Peer Comparison = 
CALCULATE(
    [Median Vendor Score],
    FILTER(
        ALLEXCEPT( 'VendorTable'[vendor_industry], 'VendorTable'[vendor_postcode])))

 

If this does not help
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Vendor Peer Comparison = CALCULATE(MEDIANX(VendorTable, VendorTable[Vendor_score] ),ALLEXCEPT(VendorTable, VendorTable[vendor_industry], VendorTable[vendor_postcode]))
Anonymous
Not applicable

@amitchandak thank you for suggesting ALLEXCEPT, which I tried and I got the 'Too few arguments' error. Do you have any other suggestions?

Anonymous
Not applicable

@amitchandak sure thank you for responding, it would look like below all sitting in the one table

VendorVednor ScoreVendor IndustryPostcodeState
Computer Share3Technology3000VIC
Computers Now2Technology3000VIC
A J Builders3Construction4000QLD
Training Solution1Training2000NSW
Informa2Training2000NSW
Salesforce5Technology3000VIC

Helpful resources

Announcements
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.