Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowGet inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.
Hi,
For the life of me I just can't get this to work..
I have a simple report with a category filter and a table visual.
I created a measure that contains the values in filter - so far so good.
I added the measure to the table visual.
Here's my problem - I'm trying to compare a specific column in the table (specific rows) to the values in measure but I can't seem to figure out the syntax.
Here's what it looks like:
https://i.imgur.com/HcAnu53.jpg
The end goal is to filter out rows with different values than the measure.
Any help would be appreciated!
Solved! Go to Solution.
I figured it out thanks to this post:
https://docs.microsoft.com/en-us/dax/selectedvalue-function
With no SELECTEDVALUE available, I used the previous way of doing it using these 3 functions:
IF(HASONEVALUE( columnName ), VALUES( columnName ), alternateResult )
@Anonymous
Create the following Measure and add it to the Visual Filter of the TAble Visual and set it to 1 and apply. I assume your Category Table and Data Table are not linked, If it is linked, create a copy of the category table and use it on your slicer.
OtherCategory =
IF(
SELECTEDVALUE('DataTable'[ColA]) =[MeasureBasedonFilter],
0,
1
)
________________________
If my answer was helpful, please consider Accept it as the solution to help the other members find it
Click on the Thumbs-Up icon if you like this reply 🙂
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
I actually wanted to try and use the SELECTEDVALUE function, but it doesn't pop up when I start typing it like other Dax functions, it seems like it's missing.
I am using Power Bi desktop May 2020 (RS version).
My analysis server version is 13.0.4474.0.
Compatibility level: 1200.
Does it have something to do with the function missing?
@Anonymous
You need to update it to the latest version. I am not sure what is RS Version?
You try this
OtherCategory =
IF(
MAX('DataTable'[ColA]) =[MeasureBasedonFilter],
0,
1
)
________________________
If my answer was helpful, please consider Accept it as the solution to help the other members find it
Click on the Thumbs-Up icon if you like this reply 🙂
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
Can't use the MAX function on strings, any chance of using a different function?
By the way, I saw other people with the same problem of this function missing, even on this forum.
I figured it out thanks to this post:
https://docs.microsoft.com/en-us/dax/selectedvalue-function
With no SELECTEDVALUE available, I used the previous way of doing it using these 3 functions:
IF(HASONEVALUE( columnName ), VALUES( columnName ), alternateResult )
@Anonymous
Is your Category Field in the same table or a different table?
You can provide sample data with the expected result to assist you with the question
________________________
If my answer was helpful, please consider Accept it as the solution to help the other members find it
Click on the Thumbs-Up icon if you like this reply 🙂
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
It's in a different table. Unfortunately I can't attach any samples because the data is sensitive.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
22 | |
12 | |
10 | |
10 | |
8 |
User | Count |
---|---|
16 | |
15 | |
14 | |
13 | |
10 |