Skip to main content
Announcements
Customer Spotlight: Discover what’s possible with embedded analytics Oct. 16 at 10:00 AM ET: REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Getting Stuck with IF Condition

Hello everyone,

I need your help, I have three region INDIA,NA,US. i want to show INDIA & NA data in hundred(two or three digits) and US data in thousands(45000)   for that i am trying below expression but its not working.

=IF(Region='US',Sum(Value),Sum(Value)/1000)

please help me ..

Thanks.

1 Solution

Accepted Solutions
sunny_talwar

If Region is not one of your dimension, then may be try this

Sum({<Region *= {'US'}>}Value) + Sum({<Region -= {'US'}>}Value)/1000

View solution in original post

11 Replies
tresesco
MVP
MVP

Could you please explain the context? Are you trying this in a chart or in textbox or the script?

Anonymous
Not applicable
Author

In chart

tresesco
MVP
MVP

Could you share a sample?

Anonymous
Not applicable
Author

sorry, i can't share.

tresesco
MVP
MVP

Can you share a screenshot of the chart and the expression you are using (that is not working)?

sunny_talwar

If Region is not one of your dimension, then may be try this

Sum({<Region *= {'US'}>}Value) + Sum({<Region -= {'US'}>}Value)/1000

Anonymous
Not applicable
Author

Thanks sunny , its working but the issues is it change the whole US value.

Anonymous
Not applicable
Author

Thanks Sunny its working now..

alis2063
Creator III
Creator III

Hi Sunny,

Why did  you use "*"  before Region?

Could you please explain ?