Best practices for using KEEPFILTERS in DAX

Поділитися
Вставка
  • Опубліковано 13 січ 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

  • @ivanrybalchenko7225
    @ivanrybalchenko7225 8 місяців тому +1

    Briliant explenation!
    Thank you Marco!

  • @RubenCarlosCalderonValladares
    @RubenCarlosCalderonValladares 8 місяців тому +1

    Extremely useful content, as always!!

  • @raufrukayat1241
    @raufrukayat1241 8 місяців тому +1

    Omg! This is well explained. Thank you so much

  • @vijaykrishnan4151
    @vijaykrishnan4151 6 місяців тому +1

    Thank you Marco

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

    Very useful. Thank you very much.

  • @Nalaka-Wanniarachchi
    @Nalaka-Wanniarachchi 8 місяців тому +1

    Wow.Clear explanation...

  • @sameerambre2696
    @sameerambre2696 6 місяців тому +1

    Nice video and very good explanation.

  • @Splinta100
    @Splinta100 8 місяців тому +1

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

  • @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.

  • @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.

  • @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

  • @Milhouse77BS
    @Milhouse77BS 8 місяців тому +1

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