Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Issue Summary:
I am experiencing an issue in Power BI related to the creation of a measure using DAX. The specific problem involves writing a DAX formula to return values based on multiple conditions, including numerical values, text, and blanks. Here are the details:
DAX Measure Error:
Measure = IF( ISNUMBER('_Class Enrollment'[Final Grade MBA]) || ISTEXT('_Class Enrollment'[Final Grade MBA]), '_Class Enrollment'[Final Grade MBA], BLANK() )Complex Conditional Logic for Measure:
DAX Formula for Measure:
Final Grade MBA = IF ( [Grade Input] = "INC", "Incomplete", IF ( [Component] = "MOD", "Module", IF ( [Grading Basis Enrollment] = "EXS", "Exempted SAIS*", IF ( [Grading Basis Enrollment] = "PNS", "Passed SAIS*", IF ( [Grade Input] <> " ", IF ( [Grading Basis Enrollment] = "AUD", "Auditor", IF ( [Grading Basis Enrollment] = "EXA", "Exempted/Audit", IF ( [Grading Basis Enrollment] = "EXE", "Exempted", IF ( [Grading Basis Enrollment] = "PNP" && [Grade Input] = "FA", "Failed", IF ( [Grading Basis Enrollment] = "PNP", "Passed", IF ( [Official Grade] <= -0.5, "Failed (" & [Official Grade] & ")", [Official Grade] ) ) ) ) ) ) ) ) ) ) )Despite following the correct DAX syntax, I am still facing issues with the implementation. I need assistance in identifying and resolving the syntax error and ensuring the logic works as intended in a measure.
Hi @Anonymous ,
Whether the advice given by @MFelix has solved your confusion, if the problem has been solved you can mark the reply for the standard answer to help the other members find it more quickly. If not, please point it out.
Best regards,
Albert He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi @Anonymous ,
Are the values Grade Input, Grading Basis Enrollment, Official Grade Measures on your model? Asking this because of the syntax you are using.
Another questions is this a measure to be returned for a only a specific context or you want the result to be generic without any specific context select?
Can you please share a mockup data or sample of your PBIX file. You can use a onedrive, google drive, we transfer or similar link to upload your files.
If the information is sensitive please share it trough private message.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsThe Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 41 | |
| 39 | |
| 37 | |
| 29 | |
| 24 |
| User | Count |
|---|---|
| 124 | |
| 107 | |
| 80 | |
| 69 | |
| 67 |