Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Dear All,
Please guide me while i am trying to make if condition in measures then why i am not able to pick the columns of my table, it is only showing the already created other measures in dax.
Please guide.
Solved! Go to Solution.
Thanks @goncalo
could you also please explain why columns are not picking up in if measure
Thanks @goncalo
could you also please explain why columns are not picking up in if measure
Hello there @Anil2264 ! That happens because a measure can only have a single (scalar) value and not a hole column or table. That is why you need to either provide a scalar value or (as I did in the measure above) store the single value in a variable to then use in the RETURN. Variables are always a good choice to implement when creating expressions with filters since the variables are evaluated outside the filters your RETURN expression applies.
You can refer to this link for further help.
Hope this answer solves your problem! If you need any additional help please @ me in your reply.
If my reply provided you with a solution, pleased consider marking it as a solution ✔️ or giving it a kudoe 👍
Thanks!
You can also check out my LinkedIn!
Best regards,
Gonçalo Geraldes
Hello there @Anil2264 ! You can structure you IF statement like so:
IF =
var _column = SELECTEDVALUE(Table[Column Name])
return
IF(
_column = condition,
value if true,
value if false (optional)
)
Hope this answer solves your problem! If you need any additional help please @ me in your reply.
If my reply provided you with a solution, pleased mark it as a solution ✔️ or give it a kudoe 👍
Thanks!
You can also check out my LinkedIn!
Best regards,
Gonçalo Geraldes
User | Count |
---|---|
42 | |
28 | |
23 | |
18 | |
16 |
User | Count |
---|---|
54 | |
35 | |
18 | |
18 | |
15 |