0
votes

In Excel I would just use large function (Doesn't exist in tableau). I have worked out how to the MAX function to get the first largest number in the row from the five columns. Now though I cannot work out how to get the 2nd and the 3rd numbers. I don't want to create a table on the screen as I then need to sum these top 3 numbers and then minus a predicted value only the final result is then shown on screen.

Column A,B,C,D,E are calculated fields if that makes any difference. hopefully the attached image will help show what I am trying to do.

Capture of table layout

Hope this helps

I can produce a sample tableau workbook if that helps.

1
Why don't use large function in excel then export to tableau?aaa
Trying to avoid running the calculations in excel where possible.Mark Larigo
Tableau has really no easy functions to solve these type of issues... Searching for loop but unable to get any functions for that aswell, Are you able to solve the problem?Siva

1 Answers

0
votes

Use the MAX() function. Something like this (you may need to adjust the number of parenthesis). If any of the columns potentially will have a NULL value, make sure you handle null values or you will end up with a null result.

    MAX(
        MAX(
            MAX(
                MAX([expr1],[expr2])
                ,[expr3]
                )
            ,[expr4]
            )
        ,[expr5]
        )