You can drag the Product onto the Rows shelf and then drag Quantity there as well (should default to SUM).
Then you can either put Storage Location onto the Filters and make this a “Multiple Values” filter
make a parameter titled Include/Exclude where you can then use in a calculated field:
If Exclude then Storage Location <> “Other” ELSE True END
Hope this helps! Sorry I can’t provide screenshots currently - commuting home! Happy to later.
Here's a quick calc you could use with a Parameter showing "Include" and "Exclude" as the options:
IF [Parameter 1] = "Include" THEN [Quantity]
ELSEIF [Parameter 1] = "Exclude" THEN (IF [Storage Location]!= "Other" THEN [Quantity] END)
If this post assists in resolving the question, please mark it helpful or as the 'correct answer' if it resolves the question. This will help other users find the same answer/resolution. Thank you.
Create a Boolean parameter called [Include Other] and use a calculation something like the following:
IF [Storage Location]<>"Other" OR ([Storage Location]="Other" AND [Include Other]) THEN [Quantity] END
Just drag this calculation on to the shelf.
Hi, thanks for the help.
May you please provide me the formula?
I have tableau 10.1, and can't open your attachement.
Hi, sorry for my ignorance, but didn´t really get your point. May you please provide a screenshot?
It almost got me my solution.
The issue I faced with this one is, the "product" and "Quantity and Storage location", come from two different data source, so the quantity value is calculated as an aggregation.
When "include" is set, all works fine.
But, when "exclude", is set, some products show the correc quantity value, but the other quantity are shown as "null".
I think the "OR", would make the calculation uncorrect, becuases it includes every "storage location"?
Option 1, should work, but I don´t want anyone being able to screw with the rest of storage locations.
Option 2, didn´t work. I think because. Product (Data source: Product List) and Quantity and Storage location (Data source: Stock List) come from two different data source, (Not Joined). So it does notthing to the calculation of "Total Quantity"
Do you have a workbook? Works fine in one data source - didn't know you were doing a blend.
1 of 1 people found this helpful
Hi Jose Salazar,
I understand now. So, even if product doesn't have data in the storage table, you want to see it.
You are correct - you'll encounter issues when doing a blend then. Is there a reason you can't join datasets prior to bringing them in?
Doing this should help you get the final view you're aiming for:
THEN [Storage Location]<>"Other" OR ISNULL([Storage Location])
CF_StorageDisplay (done to show blank string rather than writing Null):
IFNULL([Storage Location], "")
CF_Quantity (done to show 0 instead of empty cell):
Hope this helps!