5 Replies Latest reply on Jan 11, 2018 7:41 AM by Michal Mokwinski

# Displaying same value for all rows based on a condition.

Hi,

I have a worksheet with two columns. The budget will be different for all the months in the data. But I would like to show the budget for 'May' in all the rows. In the example below, the budget that you see for all the rows is of 'May' month. Please help me do this as I am stuck here.

Month     Budget

Jan           30

Feb           30

Mar           30

Apr            30

May           30

Jun            30

Jul             30

Thanks,

Ram

• ###### 1. Re: Displaying same value for all rows based on a condition.

Hi Ramkumar,

Please see attachment for my solution. (V10.2)

You need to build a calculated field: May Budget

IF [Month]!='May'

OR [Month]='May' THEN [Budget] END

Hope it helps.

Thanks,

Michael

• ###### 2. Re: Displaying same value for all rows based on a condition.

Thanks for the response Michael. I observed in your workbook, that the Budget is 30 for all the months in your original data and hence the calculated field is also showing the same value for all the rows.

In my case, the actual value is different for all the months. But the calculated field has to display May's Budget for all the months.

• ###### 3. Re: Displaying same value for all rows based on a condition.

Hi Ramkumar,

What would be the condition?

We would need to click on May's budget to see the board you shared (the one with 30 in Budget for all months)?

----------

Lénaïc RIÉDINGER, Global Community Engineer Tableau

If you see a Helpful or Correct response, please mark it thanks to the buttons below the targeted post!

• ###### 4. Re: Displaying same value for all rows based on a condition.

Hi Ramkumar,

Sorry for the mistake. Please See this one.

You need to build a tableau calculation:

LOOKUP(SUM([May Budget]))

and edit this tableau calculation "relative to May"

Thanks,

Michael

• ###### 5. Re: Displaying same value for all rows based on a condition.

Hi,

I would use something like

{if [Month] = "May" then [Budget] end}

MichaĆ