Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hi,
I found a great video on youtube how to use a measure on a slicer.
https://www.youtube.com/watch?app=desktop&v=8Nt6sHJE_RE
It's working fine and really simple to set up, but anyone an idea how you would need to change that to filter on a Value from - Value to?
Now it's always value <= selectedvalue, but I would like to have Min(selectedvalue) >= value <= Max(selectedvalue)
Thx,
Susan
Solved! Go to Solution.
Hey @Anonymous ,
as you need two values from the slicer (min and max), you have to use ALLSELECTED and then get the min and max.
Try the following approach:
Sales Between =
VAR vSelected = ALLSELECTED(Slicer[MySlicer])
VAR vMin = CALCULATE(MIN(Slicer[MySlicer]), vSelected)
VAR vMax = CALCULATE(MAX(Slicer[MySlicer]), vSelected)
VAR vCurrentSales = SUM(FactTable[Values])
RETURN
SWITCH(
TRUE(),
vCurrentSales > vMin && vCurrentSales <= vMax, vCurrentSales,
BLANK()
)
Hey @Anonymous ,
as you need two values from the slicer (min and max), you have to use ALLSELECTED and then get the min and max.
Try the following approach:
Sales Between =
VAR vSelected = ALLSELECTED(Slicer[MySlicer])
VAR vMin = CALCULATE(MIN(Slicer[MySlicer]), vSelected)
VAR vMax = CALCULATE(MAX(Slicer[MySlicer]), vSelected)
VAR vCurrentSales = SUM(FactTable[Values])
RETURN
SWITCH(
TRUE(),
vCurrentSales > vMin && vCurrentSales <= vMax, vCurrentSales,
BLANK()
)
great THX!
User | Count |
---|---|
14 | |
11 | |
6 | |
6 | |
5 |
User | Count |
---|---|
29 | |
17 | |
11 | |
7 | |
5 |