# Set a cell to specific value

How can I set a specific cell in a calculated column to a specific value?

• Hi Joel,

You can create a conditional calculation where a specific row, a specific dimension value, should be treated differently than the other rows.

Example 1. I want France to have a specific value of 1,000,000. The other countries should just keep their measure value.

This can be done as:

`if allcount(d1, d1:0, m1) = 3, m1) then 1000000 else sum(d1, 0, m1)`

Or as:

`if allcount(d1, d1:0, m1) = allcount(d1, d1:@"[France]", m1) then 1000000 else sum(d1, 0, m1)`

Example 2. If France is member of a real hierarchy:

`if allcount(d1, d1:0, m1) = allcount(d1, d1:@"[Europe].[France]", m1) then 1000000 else sum(d1, 0, m1)`

Example 3. If France is member of a custom hierarchy (two or more different dimensions on same axis):

`if allcount(d1, d1:0, m1) = allcount(d1, d1:@"[2021]";"[France]", m1) then 1000000 else sum(d1, 0, m1)`

I hope this makes sense.

BR / Ole

• Exactly what I needed!

Thanks a lot!

BR/Joel