4 favourite functions

Andrew Lang

 

For our fourth day of #CloudstreamChristmas we single out four of our favourite Tableau functions;

DATEDIFF()

 

DATEDIFF is probably the function I find myself using most often from this little list, allowing you to find out how long it has been between two dates; allowing you to do a whole lot of different sorts of specialised date filters, including but not limited to finding the last six months (not including the current month)

 

 

ZN()

 

And now onto my second most used function the ever handy ZN(). This function solves one of those annoying little issues, Tableau does not automatically turn null into zero in numeric fields while this is good for picking up data quality issues it does make row level calculations problematic, in the example below there are some locations with null returns, and we want the % returned to be zero when there are null returns (this was agreed with the ‘business’). So we have to make the null entries in returns into zeros and that's where the zn() function comes into play it Zeros the Nulls!

 

 

STR()

 

Again a useful one for formatting labels, turns any numeric value into a string, useful for mark labels and creating dimensions from numeric values;

 

 

CONTAINS()

 

Another useful function for creating dimensions, here we look for a specific set of letters/characters in a text field, for instance highlighting all the Alans in customer name

 

 

Free Alteryx Trial!

Free Tableau Trial!

Get in touch with us today!

Contact us
Cookies make it easier for us to provide you with our services. With the usage of our services you permit us to use cookies.
More information Ok