Best practices for using KEEPFILTERS in DAX

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

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

  • @michelfigueredoamieva9549
    @michelfigueredoamieva9549 7 месяцев назад +1

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

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

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

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

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

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

    Extremely useful content, as always!!

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

    Briliant explenation!
    Thank you Marco!

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

    Omg! This is well explained. Thank you so much

  • @sameerambre2696
    @sameerambre2696 6 месяцев назад +1

    Nice video and very good explanation.

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

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

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

    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.

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

    Wow.Clear explanation...

  • @nickukragan7228
    @nickukragan7228 8 месяцев назад +1

    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.

    • @AccessAnalytic
      @AccessAnalytic 3 месяца назад

      I had the same thought. Always thought provoking content that's greatly appreciated.

  • @ЕвгенийСкляров-б3ч
    @ЕвгенийСкляров-б3ч 8 месяцев назад +1

    Very useful. Thank you very much.

  • @sahilkothekar9927
    @sahilkothekar9927 8 месяцев назад +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 8 месяцев назад +1

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

  • @EmteePhoenix
    @EmteePhoenix 5 месяцев назад

    Ciao Marco,
    I have a question regarding the New Year 2018 measure. I get that without KEEPFILTERS, the filter in CALCULATE will override the filter context of the year row, resulting in the same sales figures across the years. However, why is it not also the case for the month filter context, i.e. why does January 2019 shows 449,241.51, instead of 962,326.02?

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

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

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

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

  • @vijaykrishnan4151
    @vijaykrishnan4151 7 месяцев назад +1

    Thank you Marco

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

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