ZN Function in Tableau: Replace Nulls with Zeros
Вставка
- Опубліковано 23 лип 2024
- Link to mock data set: bit.ly/39KDuWU
The ZN function helps you deal with issues and challenges caused by having Null values as part of calculations and aggregations. In this video, I show you how it works, how to use it and a scenario highlighting why it's important to know about this function.
0:00 Intro
0:22 How does ZN work in Tableau?
3:33 Use cases
6:34 Outro -
#tableau #salesforce #analytics Share feedback and Suggestions: tableautim.canny.io/suggestions -
-
Join this channel to get access to perks:
/ @tableautim ----------
(C) 2023 TN-Media LTD. No re-use, unauthorized use, or redistribution, of this video without prior permission.
More?! We can't keep up! This is fantastic stuff Tim!
Thank you Tim for sharing your knowledge with us!
Hey bro. I thought I knew tableau until i started watching your videos on Tableau functions. Very informative. You earned yourself one more subscriber👍🏿👍🏿👍🏿
This guy is awesome!
You are a great teacher. Thank you!
Thank you Tim! Great explanation.
Thanks for this vídeo!! Best regards from brazil!!!
Thanks a lot, it works with count on a table too.
The one trouble I've run into with ZN() is that it is going to offset your AVG() and MEDIAN() calcs. If you need to use a field that has a lot of nulls but calculate those types of aggregations, I end up using a filter on the measure value - special - filter nulls. ZN() works great for sums and properly labeling dimensions when there is no value.
Covered this in the video it really depends what those nulls mean. If they mean zero the they’re not offsetting anything otherwise you can filter the bulls and not use ZN
Tim is great! Easier to understand, though different style from Belle
I think that’s the great thing about UA-cam you can watch the same content from so many different creators and get the best of both. Donabelle is fantastic.
Thank you.
Hello Tim, in this particular case NOT using ZN makes more sense to me. Why would we lower the avg by adding zeros if there wasn't any film in that genre?
❤❤ Thanks 💕💕💕💕
Hi can this be used across multiple columns in one statement or do I have to write one per Measure?
One per measure. You could push this back into data prep though. It’s more of a data type / format challenge and that’s usually better done in bulk in the orgin data source. Also you could use something like Tableau prep to do it faster
@@TableauTim Yea i noticed that I am utilizing query as a measure to help format it before pushing through prep and tableau
ZN doesn't seem to work for counting rows of non-numeric data in line plots.