- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

DAX Measure : If(selectedvalue="value from column", then...
Hello.
As stated would appreciate suggestions.
I have 3 slicers for user input and have "selectedvalue" measures for each, two are text values (customer and location), the third is a % change value.
I am trying something of the likes of, as a measure:
If (and (selectedvalue(customer)=customer(from a column), selectedvalue(location)=location(from a column)), then volume(from a column)*(1+selectedvalue(%_Change)), else volume(from a column)
Since the measure won't let me select values from column (many), I'm at a loss
Thanks for your help
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Hi @jfranco,
You can try to use the following measure formulas if it suitable for your requirement:
formula =
VAR sCustomer =
SELECTEDVALUE ( Selector1[customer] )
VAR sLocation =
SELECTEDVALUE ( Selector2[location] )
VAR sChange =
MAX ( Selector3[Change] )
VAR _percent =
IF (
AND (
sCustomer IN VALUES ( Table1[customer] ),
sLocation IN VALUES ( Table1[location] )
),
sChange
)
RETURN
SUM ( Table1[Volume] ) * ( 1 + _percent )
Comment: Selector 1, 2, 3 are three standalone tables that used as source of slicer and not have relationship to the fact table.
Regards,
Xiaoxin Sheng
If this post helps, please consider accept as solution to help other members find it more quickly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Hi @jfranco,
You can try to use the following measure formulas if it suitable for your requirement:
formula =
VAR sCustomer =
SELECTEDVALUE ( Selector1[customer] )
VAR sLocation =
SELECTEDVALUE ( Selector2[location] )
VAR sChange =
MAX ( Selector3[Change] )
VAR _percent =
IF (
AND (
sCustomer IN VALUES ( Table1[customer] ),
sLocation IN VALUES ( Table1[location] )
),
sChange
)
RETURN
SUM ( Table1[Volume] ) * ( 1 + _percent )
Comment: Selector 1, 2, 3 are three standalone tables that used as source of slicer and not have relationship to the fact table.
Regards,
Xiaoxin Sheng
If this post helps, please consider accept as solution to help other members find it more quickly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Hi @jfranco
Try this
IF (selectedvalue(customer)= MAX(customer(from a column)) && selectedvalue(location)= MAX(location(from a column), MAX(volume(from a column))*(1+selectedvalue(%_Change)), MAX(volume(from a column))
But without seeing your data or an examlpe of the result you expect, I'm guessing a bit.
Phil
Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.
Blog :: YouTube Channel :: Connect on Linkedin
Proud to be a Super User!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Thanks @PhilipTreacy
I can't upload my model, but I did create a simpler one with 'fake/dummy' variables (attached link) : Volumes PBIX as you can see the measure does not change any values.
BTW you and this community are awesome, this is a world I want to live in.
Thanks

Helpful resources
Subject | Author | Posted | |
---|---|---|---|
11-21-2023 03:15 AM | |||
06-19-2024 08:36 AM | |||
07-18-2024 06:33 AM | |||
03-18-2024 11:33 PM | |||
08-13-2024 03:40 PM |
User | Count |
---|---|
109 | |
90 | |
82 | |
55 | |
46 |