Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
I'm trying to do this metric comparison between an entity the user selects against the metric of everything else in the dataset. For example, if the user selects the Vendor ADA from the slicer, it should show up on the left graph and the right graph should show the data for all the other vendors except the selected vendor (I just selected the visual-level slicers for the image below to demonstrate):
Previously, the way I did it was I created 2 datasets: 1 that the user can filter and 1 that is a "global" dataset that cannot be filtered so I can get the entire team's KPI and compare it against the selected reviewer. However, this means that the selected reviewer is still included in the global dataset.
Is there a better way of doing this?
Edit: So following the video below, I was able to exclude the selected slicer value from the right visual, but how do I retain the selected slicer value on the left visual when the slicer dimension is not in the same table?
https://www.youtube.com/watch?v=pEAwvMkpA8I
Solved! Go to Solution.
Hi @olimilo,
Thank you for follow up
You can achieve this comparison by using a separate vendor table for slicer selection and applying DAX measures with filter logic to split visuals between the selected vendor and all others.
SelectedVendor_Flag =
VAR SelectedVendor = SELECTEDVALUE('DIM_Vendor'[Vendor])
RETURN
IF(
MAX(VendorGrades[Vendor]) = SelectedVendor,
1,
0
)
SelectedVendor_Value =
VAR SelectedVendor = SELECTEDVALUE('DIM_Vendor'[Vendor])
RETURN
CALCULATE(
SUM(VendorGrades[Value]),
VendorGrades[Vendor] = SelectedVendor
)
Please find the attached pbix for your reference.
If this answer was helpful, please consider marking it as Accepted Solution and giving a Kudos, it helps the community.
Best Regards,
Harshitha.
Hi,
Not sure how much i can help but i'd like to try. Share the download link of the PBI file. Share the bare minimumum table/columns which are required for solving this problem. Please remove unnecessary tables/columns from that file.
Hi @olimilo,
Thank you for reaching out to the Microsoft fabric community forum.
you can do this by creating a separate vendor table for the slicer and using SELECTEDVALUE to get the selected vendor. Then create two measures one for the selected vendor’s data and another for all other vendors using FILTER inside CALCULATE. Use these measures in two separate visuals. This will give you the exact comparison you’re looking for.
I tested it with my sample data, and it is working fine. Please find the attached Pbix for your reference.
If the response has addressed your query, please Accept it as a solution and give a 'Kudos' so other members can easily find it
Best Regards,
Harshitha.
Is there a way to make the measure result works as a filter/flag? I am using the following to exclude the selected value:
Exclude Vendor? =
IF(
MAX('Project'[Vendor]) IN ALLSELECTED('DIM_Vendor'[Vendor])
&& COUNTROWS(ALLSELECTED('DIM_Vendor'[Vendor])) <> COUNTROWS(ALL('Project'[Vendor])),
1,
0
)
However, I am getting problems getting the one for the selected value. This one isn't working as I expected:
Selected Vendor =
VAR val = SELECTEDVALUE('DIM_Vendor'[Vendor])
VAR tmpTable =
CALCULATETABLE(
VALUES('Project'[Vendor]),
FILTER(ALL('Project'), 'Project'[Vendor] = val)
)
RETURN IF(VALUES('Project'[Vendor]) = val, 1, 0)
Hi @olimilo,
Thank you for follow up
You can achieve this comparison by using a separate vendor table for slicer selection and applying DAX measures with filter logic to split visuals between the selected vendor and all others.
SelectedVendor_Flag =
VAR SelectedVendor = SELECTEDVALUE('DIM_Vendor'[Vendor])
RETURN
IF(
MAX(VendorGrades[Vendor]) = SelectedVendor,
1,
0
)
SelectedVendor_Value =
VAR SelectedVendor = SELECTEDVALUE('DIM_Vendor'[Vendor])
RETURN
CALCULATE(
SUM(VendorGrades[Value]),
VendorGrades[Vendor] = SelectedVendor
)
Please find the attached pbix for your reference.
If this answer was helpful, please consider marking it as Accepted Solution and giving a Kudos, it helps the community.
Best Regards,
Harshitha.
Hi @olimilo,
Just wanted to check if you had the opportunity to review the suggestion provided?
If the response has addressed your query, please Accept it as a solution and give a 'Kudos' so other members can easily find it.
Thank You.
Harshitha.
Hi @olimilo ,
I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If my response has addressed your query, please Accept it as a solution so that other community members can find it easily.
Thank you.
Hi @olimilo ,
I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If my response has addressed your query, please Accept it as a solution so that other community members can find it easily.
Thank you.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
58 | |
55 | |
55 | |
37 | |
30 |
User | Count |
---|---|
78 | |
64 | |
45 | |
43 | |
40 |