Forum Discussion
nataliesmiy1357
4 years agoHelper IV
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...
nataliesmiy1357
4 years agoHelper IV
Tom - does this work instead?
TomMartens
4 years agoSuper User
No, I can't access your tenant.
- nataliesmiy13574 years agoHelper IV
It looks like my company won't share..... so let's try another way.... how can I create an if statement with two things, then...
if (a and b) then ___
- TomMartens4 years agoSuper User
Hey nataliesmiy1357 ,
using Power Query (M) here is a M snippet
if [Dim1] = "A" and [Dim2] = "B" then "this" else "that"and the same using DAX to create a calculated column
if ( ( 'Table'[Dim1] = "A" && 'Table'[Dim2] = "B" ), "this" , "that" )If this does not help consider creating a pbix using Power BI Desktop and uploading the file to your private onedrive or dropbox account (this is how most of us share files).
Regards,
Tom
- nataliesmiy13574 years agoHelper IV
That idea works yes - but I'm having trouble putting it into my report. It unfilters everything when I put that measure into the table. It's not grouping the data like I wanted....
Development Status =VAR variable1 = SELECTEDVALUE(V_TM_ModulePowerBI[ProficiencyNumber])*3VAR variable2 = count(V_TM_ModulePowerBI[EmployeeName])*3returnif(variable1 >= variable2, "YES", "NO")