How to Deal with Nulls in Tableau (IFNULL, ISNULL, ZN)

Поделиться
HTML-код
  • Опубликовано: 23 окт 2024

Комментарии • 23

  • @MochaPlayer1
    @MochaPlayer1 2 года назад +1

    This was very helpful. Thank you.

    • @onenumbertableau
      @onenumbertableau  2 года назад +1

      I'm so glad it was helpful. Thanks for the support and encouragement!

  • @bairavi07
    @bairavi07 Год назад +1

    Thank you. That’s helpful. Can you use if Null with string data

    • @onenumbertableau
      @onenumbertableau  Год назад

      Thank you! Yes, IFNULL() should work with string data too.

  • @Nick-xu2hh
    @Nick-xu2hh 3 года назад +1

    I’m having a problem that likely has to do with the very last thing you talked about. Good stuff man.

  • @thunderduck999
    @thunderduck999 Месяц назад +1

    Regarding ZN function & your ice cream example, how do you factor in if there is no date in the database?
    Example, if there is no November 12, 2017 data.
    In other words, I have no sales for November 17, 2017, that date does not exist in my database. But I want to put zero (0) for that date.

    • @thunderduck999
      @thunderduck999 Месяц назад +1

      Would like to display dates for all months on a run chart even the sales for a particular month is Zero (0).

    • @onenumbertableau
      @onenumbertableau  Месяц назад

      Hi! Thanks for reaching out. I'd recommend using the New Rows feature in Tableau Prep to generate the placeholder rows you need. help.tableau.com/current/prep/en-gb/prep_new_rows.htm

  • @ajitsathe3764
    @ajitsathe3764 3 года назад +1

    Very much helpful

  • @shoppersdream
    @shoppersdream 9 месяцев назад +1

    Can you please upload the Data you are working with? If we don't practice when you are explaining to us then it does not benefit us. Thanks

    • @onenumbertableau
      @onenumbertableau  9 месяцев назад

      Good call, I must have missed this one! Here is the workbook: public.tableau.com/app/profile/eric.parker/viz/IFNULLISNULLZN-DealingwithNulls/NullFunctionTitle

  • @junaidahmed6486
    @junaidahmed6486 8 месяцев назад

    May i know How to handle null in a date column field ?

    • @onenumbertableau
      @onenumbertableau  8 месяцев назад

      It depends what you want to replace the Null with. For example, if you're trying to calculate tenure of an employee at a company you might calculate the different between a Hire Date and a Termination Date. But if the Termination Date is null for active employees, for the sake of the DATEDIFF calculation you could do something like this IFNULL([Termination Date],TODAY())

  • @MrLukkil
    @MrLukkil 2 года назад +1

    Replacing NULL for numbers in percentage format? Doesn't seem to work for me.

    • @onenumbertableau
      @onenumbertableau  2 года назад

      Hi! Try using decimals instead of whole numbers. So if you want 10% it would be something like this, IFNULL([Measure],.1)

    • @MrLukkil
      @MrLukkil 2 года назад

      @@onenumbertableau sorry I confused you with how I wrote that!
      I have some measures in percentage format which I need to change the null values with "N/A". It works for measures in number format but not percentage format for some reason.

    • @onenumbertableau
      @onenumbertableau  2 года назад +1

      @@MrLukkil Interesting. The only way I could think to change null values to N/A would actually be to change the output to string (using the STR function). Otherwise, Tableau won't want to allow a text output for a numeric field. I've also seen folks do creative things with the number formatting options which is potentially a route you could explore: onenumber.biz/blog-1/2021/11/28/format-zeroes-as-blanks-or-dashes-in-tableau

    • @MrLukkil
      @MrLukkil 2 года назад

      @@onenumbertableau Thanks! Appreciate the swift reply. I'll take a look!

  • @onenumbertableau
    @onenumbertableau  Год назад

    Need help with your nulls in Tableau? Schedule an hour with Eric here: www.eventbrite.com/e/tableau-office-hours-with-eric-parker-tickets-42691995909
    Ready to master Tableau? Check out our lineup of upcoming classes! www.eventbrite.com/o/onenumber-15678294163

  • @im4485
    @im4485 4 месяца назад

    Tableau is complicated for no reason

    • @onenumbertableau
      @onenumbertableau  4 месяца назад

      There are definitely situations where I agree! What about nulls makes you feel that way?