The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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 |
---|---|
28 | |
12 | |
8 | |
7 | |
5 |
User | Count |
---|---|
36 | |
14 | |
12 | |
7 | |
7 |