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 Guys!
I have a column in my table which lists "'PO Year". It could have values 2021, 2022 or 2023. I want to create a new column measure called "PO Status" where if the PO year is 2021 or 2022, PO Status should say "Inactive" otherwise "Active".
PO Year | PO Status |
2021 | Inactive |
2022 | Inactive |
2023 | Active |
What should be the DAX command to help me achieve this? I am new to DAX commands, so any help is appreciated. Thanks!
IF( OR([PO Year] = 2021 , [PO Year] = 2022 ), "Inactive", "Active")
OR
IF([PO Year] = 2021 || [PO Year] = 2022 , "Inactive", "Active")
Hi @SJHALANI
Please try
PO Status =
IF (
SELECTEDVALUE ( 'Table'[PO Year] ) IN { 2021, 2022 },
"Inactive",
"Active"
)
@SJHALANI
Ok, please try
PO Status =
IF (
SELECTEDVALUE ( 'Table'[PO Year] ) IN { "2021", "2022" },
"Inactive",
"Active"
)
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 |
---|---|
15 | |
15 | |
15 | |
12 | |
10 |