Best practices for using KEEPFILTERS in DAX

Поделиться
HTML-код
  • Опубликовано: 6 май 2024
  • Best practices for deciding when to use (and when not to use) KEEPFILTERS in CALCULATE filter arguments.
    Article and download: sql.bi/837707?aff=yt
    How to learn DAX: www.sqlbi.com/guides/dax/?aff=yt
    The definitive guide to DAX: www.sqlbi.com/books/the-defin...
  • НаукаНаука

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

  • @michelfigueredoamieva9549
    @michelfigueredoamieva9549 29 дней назад +1

    Excellent representation. Thanks for all your hard work to the BI community.

  • @vijaykrishnan4151
    @vijaykrishnan4151 16 дней назад +1

    Thank you Marco

  • @jmacdono
    @jmacdono 2 месяца назад +2

    Excellent examples and explanation of the proper use of KEEPFILTERS. Thank you!!

  • @vanlessing
    @vanlessing 2 месяца назад +1

    I use KEEPFILTERS very often for accounting measures, thx for the deeper insights

  • @RubenCarlosCalderonValladares
    @RubenCarlosCalderonValladares 2 месяца назад +1

    Extremely useful content, as always!!

  • @ivanrybalchenko7225
    @ivanrybalchenko7225 2 месяца назад +1

    Briliant explenation!
    Thank you Marco!

  • @raufrukayat1241
    @raufrukayat1241 2 месяца назад +1

    Omg! This is well explained. Thank you so much

  • @Nalaka-Wanniarachchi
    @Nalaka-Wanniarachchi 2 месяца назад +1

    Wow.Clear explanation...

  • @Splinta100
    @Splinta100 2 месяца назад +1

    like the new mark up pen. was helpful. thanks.

  • @user-xf1uh4ro2z
    @user-xf1uh4ro2z 2 месяца назад +1

    Very useful. Thank you very much.

  • @SM-cs3nt
    @SM-cs3nt 2 месяца назад

    Hey there,
    For the new year sales use case - why would you define the measure specifically for a year?
    Wouldn’t a dynamic measure make a lot more sense? As in simply filtering for December and January? This way you‘d get new years sales for all years that will ever come.

  • @nickukragan7228
    @nickukragan7228 2 месяца назад

    In the first example the wrong % of tendy colors seems more right for me, because it always calculates % of all trendy colors among chosen in slicer and no matter what those trendy colors are. In a measure with keepfilters user can hardly guess what values he sees in the table. Vice versa the second usecase in video is an excellent example of using keepfilters formula - to apply both filters at the same time.

  • @sahilkothekar9927
    @sahilkothekar9927 2 месяца назад +1

    Hi Marco.If we want a very simple cal like sales for product color red and show against a brand and I have slicer for color
    Then which option is right
    1) Filter(values(color),color=red)
    2) color = Red
    3) keepfilters( color= Red) and what is best between 1& 3 option

    • @HeyAnnieHey
      @HeyAnnieHey 2 месяца назад +1

      Sales for Red Products =
      CALCULATE(
      SUM(Sales[Amount]),
      keepfilters(Products[Color] = "Red")

  • @mienzillaz
    @mienzillaz 2 месяца назад

    Ciao Marco!
    In new year sales case you have used tuples, is there a way to feed tuples dynamically?

    • @SQLBI
      @SQLBI  2 месяца назад +1

      Any table expression that generate multiple columns, e.g. SUMMARIZE or CROSSJOIN

  • @Milhouse77BS
    @Milhouse77BS 2 месяца назад +1

    In USA, we'd use order of "red, white, and blue" :) because of our flag.