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.
HI All,
I have a size slicer. I have a text box with below static text and dynamically inserted values.
Net at []-30%
Slicer has 3 values >1M, <100K, >100k-1M.
Whenever >1M is selected in slicer, the text part related to other 2 values should get hidden.
Whenever <100K is selected in slicer, the text part related to other 2 values should get hidden.
Whenever >100K- 1M is selected in slicer, the text part related to other 2 values should get hidden.
Whenever any 2 values are selected , text part related to those 2 values should be visible and the other text part should hide.
Solved! Go to Solution.
after going crazy for a whole day, found a work around, thats a bit tedious.
1. dax To show text dynamically for bucket 1
bucket >1M Text1 =
VAR SelectedSize = SELECTEDVALUE(DimBucket[Size])
var a =IF(CONTAINSSTRING(
CONCATENATEX(
ALLSELECTED(DimBucket[Size]),DimBucket[Size],","),">1M"),
"True","False"
)
RETURN
--a
IF(
a="True",
"'>1M' bucket at ", --space is mandatory after "at" as I dont want to hard code space inside textbox.
BLANK()
)
=======
2. Dax to fetch Positive values(to color it in green manually in text box)
bucket green >1M No =
VAR SelectedSize = SELECTEDVALUE(DimBucket[Size])
var a =IF(CONTAINSSTRING(
CONCATENATEX(
ALLSELECTED(DimBucket[Size]),DimBucket[Size],","),">1M"),
"True","False"
)
RETURN
--a
IF(
a="True",
if(
[size%] > 0,CONCATENATE("+", FORMAT([size %], "0.0%")) ,blank()
),
BLANK()
)
===========
3. DAX to fetch negative values(to be colored in red manually)
bucket % red >1M =
VAR SelectedSize = SELECTEDVALUE(DimBucket[Size])
var a =IF(CONTAINSSTRING(
CONCATENATEX(
ALLSELECTED(DimBucket[Size],DimBucket[Size],","),">1M"),
"True","False"
)
RETURN
--a
IF(
a="True",
if(
[size %] < 0, [size %] ,blank()
),
BLANK()
)
So I had to create n no. of measures to show/hide text and numbers dynamically in text box as per slicer selection for each bucket(<100k, 100k-1M, >1M).
My text box is now made of all inserted values.
anyone has any better idea, let me know.
thankyou.
after going crazy for a whole day, found a work around, thats a bit tedious.
1. dax To show text dynamically for bucket 1
bucket >1M Text1 =
VAR SelectedSize = SELECTEDVALUE(DimBucket[Size])
var a =IF(CONTAINSSTRING(
CONCATENATEX(
ALLSELECTED(DimBucket[Size]),DimBucket[Size],","),">1M"),
"True","False"
)
RETURN
--a
IF(
a="True",
"'>1M' bucket at ", --space is mandatory after "at" as I dont want to hard code space inside textbox.
BLANK()
)
=======
2. Dax to fetch Positive values(to color it in green manually in text box)
bucket green >1M No =
VAR SelectedSize = SELECTEDVALUE(DimBucket[Size])
var a =IF(CONTAINSSTRING(
CONCATENATEX(
ALLSELECTED(DimBucket[Size]),DimBucket[Size],","),">1M"),
"True","False"
)
RETURN
--a
IF(
a="True",
if(
[size%] > 0,CONCATENATE("+", FORMAT([size %], "0.0%")) ,blank()
),
BLANK()
)
===========
3. DAX to fetch negative values(to be colored in red manually)
bucket % red >1M =
VAR SelectedSize = SELECTEDVALUE(DimBucket[Size])
var a =IF(CONTAINSSTRING(
CONCATENATEX(
ALLSELECTED(DimBucket[Size],DimBucket[Size],","),">1M"),
"True","False"
)
RETURN
--a
IF(
a="True",
if(
[size %] < 0, [size %] ,blank()
),
BLANK()
)
So I had to create n no. of measures to show/hide text and numbers dynamically in text box as per slicer selection for each bucket(<100k, 100k-1M, >1M).
My text box is now made of all inserted values.
anyone has any better idea, let me know.
thankyou.
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 |
---|---|
80 | |
76 | |
61 | |
36 | |
32 |
User | Count |
---|---|
91 | |
60 | |
59 | |
49 | |
45 |