Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hello, I have these 2 sentences in Excel and I need to replicate it in Power BI.
Formula 1
Formula 2
Maybe someone could guide me.
Thank you.
Solved! Go to Solution.
Most IF statements will translate pretty well between Excel and Power BI because they have the same syntax. Now, your COUNTIF won't because that function doesn't exist, you need to use CALCULATE OR COUNTX.
The other part I anticipate issues is with your AND statements as the DAX versions only accept two arguments versus Excel it is a list. I would suggest using && for AND And || for OR instead.
My suggestion would be to use the SWITCH(TRUE()...) trick like this, I'll start you off:
Formula 1 =
IF([@RESPONSABLE]="REACTIVO",
SWITCH(TRUE(),
[@CATEGORIA]="DX - CUENTE" && [@SUBFALLA] = "CONEXIONES" && [@SUB SUBFALLA] = "CUENTE ...","EXCLUSIONES",
<next true/false>,<next result>
...
)
)
Most IF statements will translate pretty well between Excel and Power BI because they have the same syntax. Now, your COUNTIF won't because that function doesn't exist, you need to use CALCULATE OR COUNTX.
The other part I anticipate issues is with your AND statements as the DAX versions only accept two arguments versus Excel it is a list. I would suggest using && for AND And || for OR instead.
My suggestion would be to use the SWITCH(TRUE()...) trick like this, I'll start you off:
Formula 1 =
IF([@RESPONSABLE]="REACTIVO",
SWITCH(TRUE(),
[@CATEGORIA]="DX - CUENTE" && [@SUBFALLA] = "CONEXIONES" && [@SUB SUBFALLA] = "CUENTE ...","EXCLUSIONES",
<next true/false>,<next result>
...
)
)
Hi
Excellent contribution, everything worked perfectly.
User | Count |
---|---|
140 | |
113 | |
104 | |
77 | |
64 |
User | Count |
---|---|
135 | |
118 | |
101 | |
71 | |
61 |