Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
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êsIf you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 44 | |
| 43 | |
| 38 | |
| 18 | |
| 16 |
| User | Count |
|---|---|
| 67 | |
| 63 | |
| 30 | |
| 30 | |
| 23 |