Forum Discussion
Anonymous
6 years agoNot applicable
Formatting Data
Hello, I’ve gotten stuck at a few places trying to conditionally format my data, and hopefully this makes sense. I'm tring to build a script in order to make each cell be given a 0,1,or a 2 in a ...
dax
6 years agoCommunity Support
Hi y2jz,
I think the if condition should be measure=if(<condition>=xxx, true condition, false condition). I saw you use "==" in measure or column, will this prompt error information?
In addition, if possible, could you please inform me more detailed information(such as your data sample and your expected output)? Then I will help you more correctly.
Best Regards,
Zoe Zhi
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
6 years agoNot applicable
This still did not work for me :
AllCompany(JAN) =
IF('Sheet1'[Order]=1,
IF([Division]="-All of Company",
IF('Sheet1'[Jan]>=95,2,
IF('Sheet1'[Jan]<95 && 'Sheet1'[Jan]>71,1,
IF('Sheet1'[Jan]<=71,0,
IF([Division]="Bank",
IF('Sheet1'[Jan]>=23,2,
IF('Sheet1'[Jan]<23 && 'Sheet1'[Jan]>17,1,
IF('Sheet1'[Jan]<=17,0,
To give you more detail, in one column I am trying to assign each cell a 0, 1, or a 2 based on specified conditions. In the code, each order number is a different metric and thererfore will have different conditions, but there are also different divisions, such as "all of comapny" and "bank" listed above, that have different conditions. So I am trying to write a code that will go through my data and if it is order 1 it will go through the order 1 IF function, than if it is the bank Division then it will go through the bank IF function and return a value of 0,1, or 2 in the new column. Here is a screen shot of some of the data to get a better understanding.
Thank you