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.
I'm new to the DAX formula world and I cannot figure out a logic statement I was hoping someone could assist.
So, in english I want to evaluate a field called [Department] to see if it is blank and if it is I then want to look at the [Created By] email address. The final part is if [Created By] = brandon@brandon.com I want [DepartmentRevised] to read Department A, bob@brandon.com to read Department B, and all the other departments that weren't blank to read their true department. Thoughts?
Solved! Go to Solution.
Are you trying to make a new column that is conditional, based on columns within the same table? If so, you should be able to do something like this:
NewColumn = IF( ISBLANK( [Department] ),
[Created By], SWITCH( [Created By],
"brandon@brandon.com", "Department A",
"bob@brandon.com", "Department B",
[Department]
)
)
This is essentially saying "If Department is blank, show the CreatedBy email address. Otherwise, look at the CreatedBy email address. If it's brandon, return Department A. If it's bob, return Department B. If it's not equal to brandon or bob, return the original Department."
Are you trying to make a new column that is conditional, based on columns within the same table? If so, you should be able to do something like this:
NewColumn = IF( ISBLANK( [Department] ),
[Created By], SWITCH( [Created By],
"brandon@brandon.com", "Department A",
"bob@brandon.com", "Department B",
[Department]
)
)
This is essentially saying "If Department is blank, show the CreatedBy email address. Otherwise, look at the CreatedBy email address. If it's brandon, return Department A. If it's bob, return Department B. If it's not equal to brandon or bob, return the original Department."
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 |
---|---|
107 | |
99 | |
78 | |
64 | |
58 |
User | Count |
---|---|
148 | |
111 | |
94 | |
84 | |
67 |