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!View all the Fabric Data Days sessions on demand. View schedule
Hi All
I am trying to filter a table to get records that have had two specific status's ( 2 and 9), sample data is below.
So the ID's that match the criteria are 1, 2 , and 4.
Thanks in advance.
| ID | Status | Dateupdated |
| 1 | 2 | 01/03/2019 |
| 2 | 2 | 06/03/2019 |
| 3 | 1 | 12/12/2018 |
| 4 | 2 | 27/07/2019 |
| 5 | 4 | 30/05/2019 |
| 1 | 9 | 15/05/2019 |
| 2 | 9 | 21/06/2019 |
| 3 | 4 | 05/06/2019 |
| 4 | 9 | 14/09/2019 |
| 5 | 8 | 11/02/2019 |
| 1 | 10 | 02/11/2019 |
| 4 | 9 | 03/10/2019 |
| 5 | 10 | 19/11/2019 |
Solved! Go to Solution.
What is your preferred solution, Power Query or DAX?
In Power Query (I suspect this is not what you meant):
paste this into the advanced editor of a blank query.
let
Source = Table.FromRows(
Json.Document(
Binary.Decompress(
Binary.FromText(
"ZY/BDcAgDAN34V0pToAWZkHsv0Yd1IpGleBzMecwRtJ0JOOFCrIYtKd5jIUWPgPORP5CTXiI28LlSdsluHa6EvkoQ1A3dkF3SQ3YHmzc5IyVLmH0i8srKYIeK5tjSixWKtzCxfVv4R8V0bLi2nd83g==",
BinaryEncoding.Base64
),
Compression.Deflate
)
),
let
_t = ((type nullable text) meta [Serialized.Text = true])
in
type table [ID = _t, Status = _t, Dateupdated = _t]
),
#"Filtered Rows" = Table.SelectRows(Source, each ([Status] = "2" or [Status] = "9"))
in
#"Filtered Rows"
In DAX you could create this filter as a measure and use it to filter the visual.
filter =
SWITCH(
TRUE(),
SELECTEDVALUE(Table[Status]) IN {2, 9}, 1
)
| Have I solved your problem? Please click Accept as Solution so I don't keep coming back to this post, oh yeah, others may find it useful also ;). |
Thank you!
The DAX solution was what i was looking for.
Have a great day
What is your preferred solution, Power Query or DAX?
In Power Query (I suspect this is not what you meant):
paste this into the advanced editor of a blank query.
let
Source = Table.FromRows(
Json.Document(
Binary.Decompress(
Binary.FromText(
"ZY/BDcAgDAN34V0pToAWZkHsv0Yd1IpGleBzMecwRtJ0JOOFCrIYtKd5jIUWPgPORP5CTXiI28LlSdsluHa6EvkoQ1A3dkF3SQ3YHmzc5IyVLmH0i8srKYIeK5tjSixWKtzCxfVv4R8V0bLi2nd83g==",
BinaryEncoding.Base64
),
Compression.Deflate
)
),
let
_t = ((type nullable text) meta [Serialized.Text = true])
in
type table [ID = _t, Status = _t, Dateupdated = _t]
),
#"Filtered Rows" = Table.SelectRows(Source, each ([Status] = "2" or [Status] = "9"))
in
#"Filtered Rows"
In DAX you could create this filter as a measure and use it to filter the visual.
filter =
SWITCH(
TRUE(),
SELECTEDVALUE(Table[Status]) IN {2, 9}, 1
)
| Have I solved your problem? Please click Accept as Solution so I don't keep coming back to this post, oh yeah, others may find it useful also ;). |
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!