February 27, 2018
Tableau Tip Tuesday: Using LOD Expressions to Return the First & Last Values in a Densified Data Set
I'd like to get the difference from the first to last year for each country regardless of what year that is. When I use difference from first or a lookup, I get incorrect values for the countries that have a later year start than the others. I tried some LOD calcs, but that didn't seem to work either. Any help is appreciated!This week's tip walks you through tackling this problem. In particular, how do you do three things?
- Ignore years that have no values but a year exists
- Return the value from first and last years where data exists
- Compare the first and year to look at the change
The video and example below demonstrate the solution I came up with. Enjoy!
Subscribe to:
Post Comments
(
Atom
)
No comments
Post a Comment