All right so now let's look into how we can create a calculated column.
So just like we have created our measures we can also create columns the very same way.
Either you can go into modeling and appear and click on new column or you can simply click on your table
and click on new column.
So support this particular condition.
You can see in the table we have our product the sales and the customers and how much reading they have
given based on their experience with our with the products.
So suppose this particular customer for this the court has given 3:51 being 27 times so there are different
kind of ratings for each particular product called.
So now we want to get a calculated column which puts our value in front of each row or in front of each
quarter which determines that if the rating is between 0 to 40 then the rating is low.
If it is between 40 to 70 than the real thing is medium or video but greater than 70 then the rating
is high.
So let's create that I named this as
rating or let's say sentiment
and I lose if condition.
If the sales are up let's see if the ratings I should rather see is
is greater than zero.
And the rating is less than or equal to 40 then the conversion should be low ratings.
OK I lose another if condition and kind of nested IF condition if my rating let me expand it again if
the rating is greater than for the.
And so these two two particular pipes they are used for the OR condition.
And these this is present is used for the end condition and my rating
less than or equal to 70 then this will be treated as medium ratings.
And in the fourth condition everything above 70 or other than that will be high ratings.
I simply press enter and I'll put this in my table.
There you go.
And now you can see here let me zoom this a bit so you can see it pretty clearly.
So person was given 3:51 has been treated as a person who was given higher rating ratings so seven days
of medium ratings 75 again high high medium high medium.
So all these have come up from their.
So that's how you can create a particular calculated column.
Of course there are certain pros and cons of both because cold calculated columns and calculated measures
so which I've explained in the last week or so I suppose both of them provides their usability as the
ESPERAR nears when we need them.
So I would recommend you read to practice getting both calibrated columns and measures and if you have
any doubt related to what the difference between these two and you're facing any issue with on creating
product columns you can always ask me but as you'll keep on practicing it you will definitely find a
way to get hold of it and this would be really easy for you with time of course.
So that's all about calculator columns and keep practicing it and we'll meet in the next lecture.
Thank you.