Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello everyone,
I'm experiencing difficulties with a DAX measure in Power BI that is intended to filter four visuals based on selected experiments from a slicer. Despite multiple attempts, the visuals are not behaving as expected.
I created measures to identify the first, second, third, and fourth selected experiments:
FirstSelectedExperiment =
IF(
COUNTROWS(ALLSELECTED(Sheet1[Experiment])) >= 1,
INDEX(
1,
ALLSELECTED(Sheet1[Experiment]),
ORDERBY(Sheet1[Experiment], ASC)
),
BLANK()
)
IsFirstExperimentSelected =
IF(
HASONEVALUE(Sheet1[Experiment]) &&
SELECTEDVALUE(Sheet1[Experiment]) = [FirstSelectedExperiment],
1,
0
)
SecondSelectedExperiment =
IF(
COUNTROWS(ALLSELECTED(Sheet1[Experiment])) >= 2,
INDEX(
2,
ALLSELECTED(Sheet1[Experiment]),
ORDERBY(Sheet1[Experiment], ASC)
),
BLANK()
)
IsSecondExperimentSelected =
IF(
HASONEVALUE(Sheet1[Experiment]) &&
SELECTEDVALUE(Sheet1[Experiment]) = [SecondSelectedExperiment],
1,
0
)
ThirdSelectedExperiment =
IF(
COUNTROWS(ALLSELECTED(Sheet1[Experiment])) >= 3,
INDEX(
3,
ALLSELECTED(Sheet1[Experiment]),
ORDERBY(Sheet1[Experiment], ASC)
),
BLANK()
)
IsThirdExperimentSelected =
IF(
HASONEVALUE(Sheet1[Experiment]) &&
SELECTEDVALUE(Sheet1[Experiment]) = [ThirdSelectedExperiment],
1,
0
)
FourthSelectedExperiment =
IF(
COUNTROWS(ALLSELECTED(Sheet1[Experiment])) >= 4,
INDEX(
4,
ALLSELECTED(Sheet1[Experiment]),
ORDERBY(Sheet1[Experiment], ASC)
),
BLANK()
)
IsFourthExperimentSelected =
IF(
HASONEVALUE(Sheet1[Experiment]) &&
SELECTEDVALUE(Sheet1[Experiment]) = [FourthSelectedExperiment],
1,
0
)
Since I am still beginning with PowerBi, I might have overestimated it and I am loosing time now. Again I do not want to configure each visual manually butr I want the plots to change based on the selected experiments in the Experiment Slicer. For Example:
Plot one gets Experiment 1 relevant data, Plot 2 gets Experiment 2 relevant data, etc.. And all this in the same dashboard by dynamically selecting multiple experiments from a slicer.
Experiment,Phase_Run,Speed,MeasurementValue |
Experiment 1,Phase1_Run1,10,0.75 |
Experiment 1,Phase1_Run1,20,0.78 |
Experiment 1,Phase2_Run1,10,0.77 |
Experiment 1,Phase2_Run1,80,0.92 |
Experiment 1,Phase3_Run1,10,0.79 |
Experiment 1,Phase3_Run1,20,0.81 |
Experiment 1,Phase3_Run1,30,0.83 |
Experiment 1,Phase3_Run1,40,0.85 |
Experiment 1,Phase3_Run1,50,0.87 |
Experiment 1,Phase3_Run1,60,0.89 |
Experiment 1,Phase3_Run1,70,0.91 |
Experiment 1,Phase3_Run1,80,0.93 |
Experiment 1,Phase3_Run1,90,0.95 |
Experiment 1,Phase3_Run1,100,0.97 |
Experiment 1,Phase3_Run2,10,0.80 |
Experiment 1,Phase3_Run2,20,0.82 |
Experiment 1,Phase3_Run2,30,0.84 |
Experiment 1,Phase3_Run2,40,0.86 |
Experiment 2,Phase1_Run1,10,0.74 |
Experiment 2,Phase1_Run1,20,0.76 |
Experiment 2,Phase1_Run1,30,0.78 |
Experiment 2,Phase1_Run1,40,0.80 |
Experiment 2,Phase2_Run1,20,0.78 |
Experiment 2,Phase2_Run1,30,0.80 |
Experiment 3,Phase1_Run1,100,0.96 |
Experiment 3,Phase1_Run2,10,0.79 |
Experiment 3,Phase1_Run2,20,0.81 |
Experiment 3,Phase1_Run2,30,0.83 |
Experiment 3,Phase1_Run2,40,0.85 |
Solved! Go to Solution.
You may want to look into Small Multiples. There may not be a need for these measures as visual filters.
Please show the expected outcome based on the sample data you provided.
You may want to look into Small Multiples. There may not be a need for these measures as visual filters.
Please show the expected outcome based on the sample data you provided.
It worked fine ! Using Small multiples solved the issue. I was counting too much on GPT and Claude AI, but neither of them provided a suitable answer. At least both went for a complicated DAX based approach!
Your solution is great lbendlin
Hi, @Spearitch502
Super user answers your questions, and you get answers from them. You can mark his reply as a solution so that others in the community can quickly find an answer if they have a similar problem.
Your cooperation will work with us to promote the development of the community. Thank you again for your cooperation!
Best Regards
Jianpeng Li
Hello,
I think that something was not working. I already accepted it yesterday. Anyway I re-accepted his answer as a solution and it should work now
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
65 | |
63 | |
53 | |
39 | |
26 |
User | Count |
---|---|
85 | |
57 | |
45 | |
44 | |
36 |