Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Greetings,
I need to perform a DAX calculation that looks at columns C and D and if they are over a certain number then a return colum should say 'Fail' otherwise 'Pass". The problem I am having is that my report keep on suggesting key measures instead of the actual table and column. When I just type the table with the colum i.e. 'Table'['results'] or 'Table'[results]. The program doesnt like it and gives me an error. I thought it was because the C and D columns were sum but that is not the case. Thanks in advance.
Solved! Go to Solution.
Hi @Anonymous
Please show us your data and the DAX you are trying to write. Really hard to see the issue without them.
That said, I'm guessing that you are might be trying to write a measure and DAX is telling you that you need to provide an aggregation for the column.
Also, is it a Fail if both C and D are over a certain number, or is it just one or the other over a certain number?
If you are writing DAX to create a column it could look like this which produces Fail if both C and D are over 20. Adjust as required.
Result = IF([C] > 20 && [D] > 20, "Fail", "Pass")
Regards
Phil
Proud to be a Super User!
Thanks again.
Hi @Anonymous ,
If it is to calculate the sum of metrics, you can use the SUMX function.
SUMX(<table>, <measure>)
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous
Please show us your data and the DAX you are trying to write. Really hard to see the issue without them.
That said, I'm guessing that you are might be trying to write a measure and DAX is telling you that you need to provide an aggregation for the column.
Also, is it a Fail if both C and D are over a certain number, or is it just one or the other over a certain number?
If you are writing DAX to create a column it could look like this which produces Fail if both C and D are over 20. Adjust as required.
Result = IF([C] > 20 && [D] > 20, "Fail", "Pass")
Regards
Phil
Proud to be a Super User!
User | Count |
---|---|
127 | |
108 | |
99 | |
63 | |
62 |
User | Count |
---|---|
136 | |
113 | |
102 | |
71 | |
60 |