12 Replies Latest reply on Oct 26, 2013 3:41 AM by . Indumon

# Calculated Field without showing related dimension

First of all, please excuse my bad English. I will try my best.

I am trying to make a calculated using IF function based on the return of one dimension 'in my example called uom'. The calculated field works very fine when I show the related field 'uom' in the view; however, when I remove 'uom' it total number of QTY is not correct.

Please check attached picture which are self-explanatory.

For Example: the total QTY of the 1st SKU should be 537.08 not 25,910

• ###### 1. Re: Calculated Field without showing related dimension

Hi Abdullah,

Sum(IF [uom] = "PCS" THEN [QTY]/[BUoM] ELSE QTY END)

• ###### 2. Re: Re: Calculated Field without showing related dimension

. Indumon has the right idea, I think.  See attached

1 of 1 people found this helpful
• ###### 3. Re: Calculated Field without showing related dimension

What a timing

• ###### 4. Re: Calculated Field without showing related dimension

Thanks everyone, I would love to mark both as Correct Answer, But Indumon was first.

Thanks a lot.

In fact, I am using Tableau by nature. I haven't join any training or have read advanced reference. However, it looks I have to start reading. Because day after a day I am loving Tabelau more and more.

• ###### 5. Re: Calculated Field without showing related dimension

No worries, and welcome to the forum!  This is the best place to learn about Tableau, if you ask me.

• ###### 6. Re: Calculated Field without showing related dimension

Thank you Habibi

• ###### 7. Re: Calculated Field without showing related dimension

. Indumon You know 'Habibi'

• ###### 8. Re: Calculated Field without showing related dimension

yeah, My favorite Arabic word. I am from Dubai

On Fri, Oct 25, 2013 at 11:18 PM, Abdullah Alahdal <

• ###### 9. Re: Calculated Field without showing related dimension

May I ask one more question.

Now instead of the [BUoM], I want to divide by Factor where LargeUOM = "PCS"

 ItemNo LargeUOM Factor 100000 BAG 1 100000 KAR 1 100000 PAL 1 100000 PCS 30 100000 TO 1 100001 BAG 1 100001 KAR 1 100001 PAL 1 100001 PCS 10 100001 TO 1 100002 BAG 1 100002 KAR 1 100002 PAL 1 100002 PCS 4 100002 TO 1
• ###### 10. Re: Calculated Field without showing related dimension

Hi,

I think this is what you are looking for..

Sum(IF [LargeUOM] = "PCS" THEN [QTY]/[Factor] ELSE QTY END)

• ###### 11. Re: Calculated Field without showing related dimension

Thanks a lot Indumon.

In fact few minutes ago I made. It was so simple.

I have 2 tables and both have ItemNo and LargeUOM. Therefore, I have just joined them and changed the formula to be as follows:

[QTY]/[Factor]

And It works, day after a day tableau surprises me.

Thanks a lot.

• ###### 12. Re: Calculated Field without showing related dimension

That's great!

Please check this one Introduction to Calculations | Tableau Software, it will accelerate your calculations learning.

1 of 1 people found this helpful