The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event! Join us in Stockholm, Sweden from September 24-27, 2024.
2-for-1 sale on June 20 only!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
I have created below table using mesure. All working as expected except the values in "Final Value" colum. The requirement is that if -
1. "Pass/Fail" column is = Ok than return "Pass"
2. "Pass/Fail" column is = Errors than return "Fail"
3. "Pass/Fail" column is = In Progress than return "In Progress"
4. "Pass/Fail" column is = Initial than return "Not Started"
Else "In Process"
In the below example column value must be "In Process", the code that i have written on the screen for the colum "Filal Status" is incorrectly showing "Initila". Please help!
Solved! Go to Solution.
Hi, @MurVeman
You can try the following methods.
Column = SWITCH(TRUE(),
SEARCH("OK",[Pass/Fail],,0)<>0,"Pass",
SEARCH("Fail",[Pass/Fail],,0)<>0,"Fail",
SEARCH("In Progress",[Pass/Fail],,0)<>0,"In Progress",
SEARCH("Initial",[Pass/Fail],,0)<>0,"Not Started",
"In Process")
SEARCH function (DAX) - DAX | Microsoft Learn
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
hi @MurVeman
Try:
Correction -
If the "Pass/Fail" value contains "Fail" than it should returm "Fail".
Hi, @MurVeman
You can try the following methods.
Column = SWITCH(TRUE(),
SEARCH("OK",[Pass/Fail],,0)<>0,"Pass",
SEARCH("Fail",[Pass/Fail],,0)<>0,"Fail",
SEARCH("In Progress",[Pass/Fail],,0)<>0,"In Progress",
SEARCH("Initial",[Pass/Fail],,0)<>0,"Not Started",
"In Process")
SEARCH function (DAX) - DAX | Microsoft Learn
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
hi @MurVeman
your evaluation is on a different column [MaxFlow], based on yyour requirement you need to evaluate the ["Pass/Fail"] Column.
your evaluation will be something else based on your data tho:
Switch ( 'yourcolumn'[Pass/Fail],
"OK" ,"Pass",
"Errors", "Fail" ,
"In Progress", "In Progress",
"Initial ", "Not Started" ,
"In Process"
)
Thanks a lot for replying !
Your solution works, i have another requirement in addition to the one that you have givn to me. If the "Pass/Fail" value contains "Errors" than it should returm "Fail".
For all other combinations\(as displayed on the screen below), it mest me "In Progress"
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the June 2024 Power BI update to learn about new features.
User | Count |
---|---|
105 | |
97 | |
80 | |
62 | |
57 |
User | Count |
---|---|
246 | |
119 | |
114 | |
86 | |
70 |