Data Source-Based Lookups in Tableau
THE CHALLENGE
Last week at work I (Klaus) puzzled my head over an interesting question. I was looking at production orders and production dates and had to calculate differences between production dates:
- If a production order has consecutive production days (the datediff between the days is 1) then the machine only has to be equipped once.
- If the datediff between two production days is >1, the machine has to be equipped on each production date.
THE TABLE CALCULATION-APPROACH
My first impulse was: Table Calculations! This should be something lookup() should do easily for me!
Adapting my question to superstore data, I’m looking at customers and order dates. I created this lookup-formula, let it restart every customer and was ready to go:
Ken Flerlage, March 12, 2019
No comments: