Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hi although I'm not new new to PowerBI I am struggling trying to create a calculated column. I have named the column Leaver in the same year. I am running a data set on new starters - but also interested if they left within the same period, my attempt is below,
Solved! Go to Solution.
@Parno Please try this:-
Leaver in the same year =
IF (
INT('HESA Extract'[JOINER IN PERIOD]) = 1
&& INT('HESA Extract'[LEAVER IN PERIOD]) = 1
&& 'HESA Extract'[TYPE] = "Continuing",
"Yes",
"No"
)
Best Regards,
Samarth
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin
Hi @Parno ,
You could use below code:-
Leaver in the same year =
IF (
'HESA Extract'[JOINER IN PERIOD] = "1"
&& 'HESA Extract'[LEAVER IN PERIOD] = "1"
&& 'HESA Extract'[TYPE] = "Continuing",
"Yes",
"No"
)
Best Regards,
Samarth
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin
Thanks for your help! really appreciated - I get the following message - any ideas?
DAX comparison operations do not support comparing values of type Integer with values of type Text. Consider using the VALUE or FORMAT function to convert one of the values.
@Parno Please try this:-
Leaver in the same year =
IF (
INT('HESA Extract'[JOINER IN PERIOD]) = 1
&& INT('HESA Extract'[LEAVER IN PERIOD]) = 1
&& 'HESA Extract'[TYPE] = "Continuing",
"Yes",
"No"
)
Best Regards,
Samarth
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin
Thank you so much - you are amazing!
@Parno take a look if there are a sintax problem.
you can try 1 of 2 of this:
Leaver in the same year = IF ((HESA Extract'[JOINER IN PERIOD] =1 && HESA Extract'[LEAVER IN PERIOD] = 1 && HESA Extract'[TYPE] ="Continuing","Yes", "No"))
Leaver in the same year = IF ((HESA Extract'[JOINER IN PERIOD] ="1" && HESA Extract'[LEAVER IN PERIOD] = 1 && HESA Extract'[TYPE] ="Continuing","Yes", "No"))
Thank you, but of these show the result as #ERROR
Hello @Parno ,
try this
Leaver in the same year = IF ((HESA Extract'[JOINER IN PERIOD] =1 && HESA Extract'[LEAVER IN PERIOD] = 1 && HESA Extract'[TYPE] ="Continuing",'Yes", "No"))
If I answered your question, please mark my post as solution so it would appeare to others, Appreciate your Kudos 👍
Proud to be a Super User! | |
Thank you, but sadly this didnt work.
User | Count |
---|---|
141 | |
113 | |
104 | |
77 | |
64 |
User | Count |
---|---|
136 | |
125 | |
107 | |
70 | |
61 |