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,
I have 2 slicers and the I want the result text box in such a way that if I select the first slicer and don't select any option from the second slicer, the text should be based on only the selected first slicer option. Now comes the complicated part where if I keep the selected first slicer option and then also select an option from the second slicer, the text should only display the value of the second slicer.
Example -
Slicer 1 options -> A,B,C,D
Slicer 2 options -> P,Q,R,S
If I select slicer 1 option A and don't select anything from slicer 2, result should be A
If I keep the slicer 1 as A and also select for example Q from slicer 2, result should be Q
One thing to note is that the slicer 1 is connected to slicer 2 in such a way that whenever I select any option from slicer 1, options are filtered for slicer 2.
I am having a hard time to design a DAX formula for this.
Thanks!
Solved! Go to Solution.
Something like this should work:
Text Measure =
VAR varFirstSlicer =
SELECTEDVALUE( Table[Field] )
VAR varSecondSlicer =
SELECTEDVALUE( Table[Field2] )
VAR Result =
IF(
ISBLANK( varSecondSlicer ),
varFirstSlicer,
varSecondSlicer
)
RETURN
Result
If the second slicer has anything but 1 value selected, you'll get the first slicer value.
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI ReportingIt worked, thank you!
Awesome. SELECTEDVALUE() is one of my favorite functions. If you have 1 value selected it returns it. If you have 2+ or none selected, it returns blank.
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI ReportingSomething like this should work:
Text Measure =
VAR varFirstSlicer =
SELECTEDVALUE( Table[Field] )
VAR varSecondSlicer =
SELECTEDVALUE( Table[Field2] )
VAR Result =
IF(
ISBLANK( varSecondSlicer ),
varFirstSlicer,
varSecondSlicer
)
RETURN
Result
If the second slicer has anything but 1 value selected, you'll get the first slicer value.
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI ReportingCheck 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 |
---|---|
27 | |
10 | |
10 | |
9 | |
6 |