Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi there!
I have a doubt, I Have a table with 4 fields, all are from the original table.
| Product | Region | Sum of Product | Sum for Total Region |
In addition of this, I made a calculated measure field in which I'm calculating a percentage from the [ Sum for Total Region ] with the next function:
calculated measure field [% From Total] = [ Sum of Product ] / [ Sum for Total Region ] = % from the Sum for Total Region
Then I have my table with 4 original fields and 1 as a calculated measure:
| Product | Region | Sum of Product | Sum for Total Region | % From Total |
My doubt is: How could I make a new field [ Class ] to get a classification from my calculate measure field as such as I want:
| % From Total | Class |
If the result in the camp % From Total >= 0% and <=40% then is Bad
If the result in the camp % From Total >= 41% and <=70% then is Regular
If the result in the camp % From Total >= 71% and <=100% then is Good
For Example:
| % From Total | Class |
| 52.48% | Regular |
| 79.99% | Good |
....
I hope you could help me.
Greetings
Luis
Hi Luis,
You can create a new calculated measure field [Class] with:
=if([% From Total] <= 40, 'Bad', if([% From Total] <= 70,'Regular', if([% From Total] <= 100,'Good')))
I assume that this is in script. Just use resident load or preceding load to get the classes created on the calculated column.
Hi Henry, I tried to do it, but in the master dimension the code doesn't recognize the field. It say: Camp [% ...] is not valid.
How can I make reference to this measure?
Greetings!
Hi Sujeet, I was trying to load in the script, but I don't know there how I can calculate the measure between the two columns.
Greetings
Did you find a solution for this ? I have a similar requirement.
Hi Deepika TR,
No yet, I've been trying to do it but I can't get the result I want...
Do you have any idea, maybe someone can read us and will catch it...
Regards
Luis