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.
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!
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
23 | |
8 | |
7 | |
6 | |
6 |
User | Count |
---|---|
28 | |
12 | |
10 | |
10 | |
6 |