Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
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.