Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi,
I need to create a calculated column with the following rules:
Write 1 IF:
Project is within G0 to G5 and status is 1 and description field is blank
OR (Project is within G0 to G5 and status is 2 and description field is blank)
OR (Project is within G0 to G5 and status is 0)
ELSE 0
I have tried the following statement but so far I haven't found a solution that works
Hope someone can help.
Solved! Go to Solution.
@NikFe try this:
Overall Status =
IF(
Initiatives[Stage]
IN {
"Demand Qualification",
"G0 Approval",
"G1 Approval",
"G2 Approval",
"G3 Approval",
"G4 Approval",
"G5 Approval"
},
IF(
Initiatives[Status] = "0",
1,
IF(
Initiatives[Status] IN {"1","2"}
&& Initiatives[Description] = BLANK().
1,
0
)
)
)
@NikFe try this:
Overall Status =
IF(
Initiatives[Stage]
IN {
"Demand Qualification",
"G0 Approval",
"G1 Approval",
"G2 Approval",
"G3 Approval",
"G4 Approval",
"G5 Approval"
},
IF(
Initiatives[Status] = "0",
1,
IF(
Initiatives[Status] IN {"1","2"}
&& Initiatives[Description] = BLANK().
1,
0
)
)
)
Hi Sparta,
Thanks for you reply.
When I try the provided solution I get the following error message:
Function 'CONTAINSROW' does not support comparing values of type Integer with values of type Text. Consider using the VALUE or FORMAT function to convert one of the values.
Any idea of how to get around that ?
I think because your status column is a text, I'm adding "" around the relevant places in the original messages, you will see this in a minute
You were right with the status code column beeing text.
But still think there are something wrong with you code.
E.g. a project with Initiatives[Stage] = G2 Approval and
Initiatives[Status] = 1 and Describtion BLANK will be assigned with 0
Sorry. It was me messing up with a column name. It seems to work flawlessly! Thanks alot
@NikFe my pleasure 🙂
Will appreciate your Kudos 🙂
P.S. Check out my showcase report - got some high level stuff there. Sure you will find there a lot of cool ideas. Please give it a thumbs up over there if you liked it 🙂
https://community.powerbi.com/t5/Data-Stories-Gallery/SpartaBI-Feat-Contoso-100K/td-p/2449543
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
49 | |
25 | |
20 | |
15 | |
12 |
User | Count |
---|---|
57 | |
49 | |
44 | |
18 | |
18 |