Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
FileID Employee Concerns Reason 1 Reason 2 Reason 3
1 John Yes
2 Emily No
3 Henry Yes health fatigue
I'm wanting to create an IF statement that will return the FileID and the employee name when I insert this measure into a matrix that has the emploees in the row section and file ID for the columns
** or a calculated column that will return a value on every row if the below if statement is true
The IF statement will check to see if Concerns = "Yes" and then check to see if Reason 1, Reason 2 or Reason 3 are blank
I want to see an error made by employees when filling out the form to make sure if they are filling out "yes" for concerns that they are then filling out either reason 1, reason 2 or reason 3 any of them can be filled in but at least one
So something like IF(concerns = "yes" then return 1 if Reason 1 or reason 2 or reason 3 are blank
and the opposite as well IF(concerns = "no" then all the fields (reason 1, reason 2, and reason 3 should ALL be blank)
Solved! Go to Solution.
Hi @Anonymous ,
You can refer to the DAX below:
Y =
IF (
MAX ( 'Table'[Concerns] ) = "Y"
&& (
NOT ( MAX ( 'Table'[Reason 1] ) = "" )
|| NOT ( MAX ( 'Table'[Reason 2] ) = "" )
|| NOT ( MAX ( 'Table'[Reason 3] ) = "" )
),
1,
IF (
MAX ( 'Table'[Concerns] ) = "N"
&& MAX ( 'Table'[Reason 1] ) = ""
&& MAX ( 'Table'[Reason 2] ) = ""
&& MAX ( 'Table'[Reason 3] ) = "",
1
)
)
If I misunderstood, please provide the result you expect.
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
You can refer to the DAX below:
Y =
IF (
MAX ( 'Table'[Concerns] ) = "Y"
&& (
NOT ( MAX ( 'Table'[Reason 1] ) = "" )
|| NOT ( MAX ( 'Table'[Reason 2] ) = "" )
|| NOT ( MAX ( 'Table'[Reason 3] ) = "" )
),
1,
IF (
MAX ( 'Table'[Concerns] ) = "N"
&& MAX ( 'Table'[Reason 1] ) = ""
&& MAX ( 'Table'[Reason 2] ) = ""
&& MAX ( 'Table'[Reason 3] ) = "",
1
)
)
If I misunderstood, please provide the result you expect.
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi,
I would suggest that in the query editor, you select t he first 3 columns, right click on the column heading and select "Unpivot other columns". Then you drag File ID and Name to the visual. To your visual, drag Attribute to the filter/slicer and select Yes. Drag File ID to the row labels. This should show you all those File ID who answered Yes and recorded some reason.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
81 | |
76 | |
61 | |
37 | |
33 |
User | Count |
---|---|
101 | |
56 | |
51 | |
45 | |
40 |