Easily Turn a Group into a Calculated Field in Tableau

Thanks for checking out this video! To learn more, check out our upcoming classes, webinars and office hours here: www.eventbrite.com/o/onenumbe...
------
Groups are an incredible feature in Tableau, but they are limited. For instance, you can’t leverage a group for a blend or cross-database join.
If you need to use the output of a group for data preparation, you will probably want to turn it into a calculated field. Rather than doing it slowly by hand, why not leverage a quick formula which can speed up the process?
This video demonstrates how you can easily turn a group into a calculated field in Tableau.
Here's the formula from Excel if you want to use it to get a head start!
=CONCATENATE("WHEN '",A2,"' THEN '",B2,"'")

Пікірлер: 15

  • @onenumbertableau
    @onenumbertableau Жыл бұрын

    Need help with your groups or calculated fields? Schedule an hour with Eric here: www.eventbrite.com/e/tableau-office-hours-with-eric-parker-tickets-42691995909 Ready to master Tableau? Check out our lineup of upcoming classes! www.eventbrite.com/o/onenumber-15678294163

  • @zio.eza25
    @zio.eza259 ай бұрын

    Oh my.. This is really helpful. I was super desperate back then when facing the join problem. Super thanks 😭🤩

  • @onenumbertableau

    @onenumbertableau

    9 ай бұрын

    You are most welcome! We're so glad to hear this helps!

  • @user-dx1mn9wb4x
    @user-dx1mn9wb4x5 ай бұрын

    Great Video! Does the Case statement with similarly with date data? For instance, if I wanted to group date data into ranges or bins of time, so that I can then perform calculations within those new ranges of bins of time on the data relevant to them. Thanks ,

  • @onenumbertableau

    @onenumbertableau

    5 ай бұрын

    Not really. CASE is more for direct 1 to 1 conversions. So maybe something like... CASE DATEPART('quarter',[Date Field]) WHEN 1 THEN "Quarter 1" WHEN 2 THEN "Quarter 2" END If you want to set start and end dates for date ranges, IF statements are a better way to go. Here's our primer on IF THEN statements in Tableau: onenumber.biz/blog-1/2022/12/7/tableau-if-then-logic-function-explained

  • @bhuvaneswarinathan3741
    @bhuvaneswarinathan37412 жыл бұрын

    Good Work!

  • @onenumbertableau

    @onenumbertableau

    2 жыл бұрын

    Thanks so much!

  • @ajitsathe3764
    @ajitsathe37642 жыл бұрын

    Good One.

  • @onenumbertableau

    @onenumbertableau

    2 жыл бұрын

    Thank you!

  • @nimx30
    @nimx303 ай бұрын

    any chance you would help out a poor PG student who might fail her module if she doesnt get help???? 😂😂

  • @onenumbertableau

    @onenumbertableau

    3 ай бұрын

    Hi! What do you need help with? Do you have a specific question about this?

  • @nimx30

    @nimx30

    3 ай бұрын

    @@onenumbertableau so i tried to create a calculated field for groups exactly the way you showed. my data also had apostrophes so i had some problems but i went to the original data and removed them altogether. i applied the calculation and it said the calculation is valid. at this point the data source page should show the new calculation right? but it only says null in the whole column. i even tried doing it through IF and THEN instead of CASE ( i had 6 products that needed to be grouped into 3 groups....2 products in each group) in the end NOTHING WORKED any idea what could have gone wrong?

  • @onenumbertableau

    @onenumbertableau

    3 ай бұрын

    @@nimx30 I think that would only work if the apostrophes were removed in the source data too, not just the calculation. Can you alter the formula in Excel to utilize double quotes instead of single quotes?

  • @nimx30

    @nimx30

    3 ай бұрын

    @@onenumbertableau yes that is what i meant that i did remove the apostrophes from the source data (the excel file) just like you did in the video. i can try double quotes too if youre suggesting it will solve the problem

  • @onenumbertableau

    @onenumbertableau

    2 ай бұрын

    @@nimx30 Hopefully it helped! Names with quotes caused me problems in the past too. Maybe best to remove them via a calculation in Tableau and then do the conversion in Excel. Just a thought!