Forum Discussion
Custom if statement
Hello! I am trying to write a switch statement (or an if statement), but it's not working correctly.
I want to create an equation/statement that takes the number for the minimum no of tms (the value) and if the count of employees with a score (in the colors) greater than 3 is the minimum no of tms or greater, then yes, but if not, no. (something like: if (count(employee name) with score >= 3 is greaterthan or equal to minumum number of tms, yes, no)
But I'm not sure how to write that in DAX. Would it be a double if statement? Thanks in advance
9 Replies
- TomMartensSuper User
Hey nataliesmiy1357 ,
please create a pbix file that contains sample data, but still reflects your data model (tables, relationships, calculated columns, measures), of course only the objects are important that circle around the challenge you are facing. Upload the pbix file to onedrive or dropbox and share the link. If you are using Excel to create the sample data instead of the manual input method, share the Excel file as well.
Describe the expected result based on the sample data you provide.
Regards,
Tom
- nataliesmiy1357Helper IV
Tom - here is the link to my pbix file.
This is the idea I'm thinking: (something like: if (count(employee name) with score >= 3 is greaterthan or equal to minumum number of tms, yes, no)
Also, here is a screenshot of what it should be (the yes's and no's)
- TomMartensSuper User
Hey nataliesmiy1357 ,
the link you provided is not the link to pbix file, but instead it points to the report in your power bi tenant. As I'm not a member of your tenant, I can't access the report.
Regards,
Tom