Using KEEPFILTERS in DAX

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

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

  • @jdiazrop
    @jdiazrop 6 месяцев назад +3

    Absoutelly a genius !, not for the knowledge itself (that also), but for the way and style you use to teach it to people. Thank you v. much.

  • @baskis69
    @baskis69 2 года назад +2

    Thanks for sharing, not only for the content but also for the way Alberto explains it. I love it. Grazie mille!

  • @Niteshkumar-ly2ip
    @Niteshkumar-ly2ip Год назад +1

    Hello Sir,
    I am from India and love your way of teaching because it is always Practical and Concise. I watch your videos on daily basis whenever I Come across any difficulties in understanding concepts of Power BI especially DAX.
    Thanks for teaching all these valuable concepts for free of cost.

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

    Bravo Maestro! Exactly what I was needing to organize my thoughts about KEEPFILTERS, FILTER and VALUES.

  • @BaldBookTuber
    @BaldBookTuber 2 года назад +2

    Thank you so much to both of you for continuing to educate us on proper DAX usage. I literally pick out something useful on each of these videos, and am often able to apply it in my next work project.

  • @Bharath_PBI
    @Bharath_PBI 2 года назад +2

    Enjoyed the video and the article. Clear and concise 👍 Thank you 👍

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

    Thank you, Mr.Ferrari! Great and useful video!

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

    Thank you very much for this excellent tutorial! I'm already tweaking some measures that I made before knowing this powerful info. You make it SO EASY to learn. :-)

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

    This really helped me get over a problem with circular references and keeping multiple filters. Calculate worked great until I added in a DAX table with a column referencing a measure with calculate in it. Not sure if its the best way but I got a solution using the verbose use of FILTER & SUMMARIZE. We will see if I have cracked it 🙂

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

    Thanks a lot Alberto, your Tutorials are very valuable.
    The question I have is how to use color filters in slicer.

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

    Excellent, as usual clean and accurate explanation, grazie mille.

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

    Amazing! Very well explained

  • @louism.4980
    @louism.4980 Год назад

    Thank you :), very thought-provoking.

  • @user-lm5wb8vi1x
    @user-lm5wb8vi1x 20 дней назад

    Finished watching

  • @hillarymushi2227
    @hillarymushi2227 5 месяцев назад +1

    Thank you very much alberto

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

    another great video!

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

    love the thumbnail ♥️

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

    Great video, Alberto! Please keep doing these common DAX CALCULATEvideos I've been doing DAX for years but love to keep the fundamentals fresh in my mind.
    Quick question:
    Instead of using SUMMARIZE, can't you just use VALUES twice in the filter arguments of CALCULATE?
    Does the following expression work for [Only Red Contoso VALUES] measure instead of using the SUMMARIZE function?
    Only Red Contoso VALUES =
    CALCULATE (
    [Sales Amount],
    AND ( 'Product'[Color] = "Red", 'Product'[Brand] = "Contoso" ),
    VALUES ( 'Product'[Color] ),
    VALUES ( 'Product'[Brand] )
    )

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

      It's not the same - in general, you could have arbitrary combinations of color and brand selected, so if the user selected (Green+Contoso) and (Red+Litware) using a hierarchical slicer, the result with VALUES would show Red+Contoso, which wouldn't be included by using the SUMMARIZE version.

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

    extremely valuable content

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

    Hi Alberto, great explanations as always! Thank you.
    Could you kindly explain use of KEEPFILTERS in a more complex example used in your book (Definitive Guide), SalesOfFirstYearCustomers (page 385), where you use it in CALCULATE as a modifier and wrap it around table derived from VALUES(Sales[CustomerKey])? You briefly mentioned that purpose of KEEPFILTERS there is to make it possible to filter customers, say by country - but after running so many scenarios, I couldn't find a realistic one where it could really be used to make a difference in Matrix.
    Also should it be maybe better to use table SUMMARIZE(Sales, Customer[CustomerKey]) instead of VALUES(Sales[CustomerKey]) in CALCULATE so as to filter by dimension table column?

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

    Hi, thanks, I think I understand a bit more re SUMMARIZE, am i right in thinking that
    SUMMARIZE ie
    SUMMARIZE( Table1, Table1[Color]) ,
    produces a table in the current filter context, winch is why,
    CALCULATE( [TotalSales],FILTER( SUMMARIZE( Table1, Table1[Color]), Table1[Color] = "red"))
    does not need Keep Filters, I only found this out while trying it instead of my usual CROSSJON
    to create a table of multiple columns to feed to Filter. Oh, Happy New Year. Perhaps I should make resolution, to finally sit and read your book properly.

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

    did microsoft change the behavior of calculate? I didn´t use keepfilters and the matrix shows the results only in red

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

      No - check the sample file you can download.

  • @Alireza-ih5vu
    @Alireza-ih5vu 2 года назад +1

    Perfect

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

    I'm trying to do the always version but keep getting the value only on the "FirstDate1" any idea why and how can I make it to show this everywhere?
    My Code:
    FirstValue =
    Var FirstDate1 = MINX(ALLSELECTED(Merge1[Dates]),Merge1[Dates])
    Var PrvniCena = CALCULATE([mCena weighted], FILTER(ALL('Merge1'[Dates]), Merge1[Dates] = FirstDate1))
    RETURN PrvniCena

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

    Brilliant as always 😀 how many likes can I click?
    I have a question:
    What if the columns are in different tables. I guess KEEPFILTERS has no problem with that? What about VALUES? Shall we use CROSSJOIN?

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

      It should work without issues.

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

      @@SQLBI thank you so much. but can we use CROSSJOIN of VALUES instead of KEEPFILTERS?

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

    ❤❤❤

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

    Using ALL in Filter Function we get same values in table but using values we get value only for red.
    I could not get point. Can anyone explain it?

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

      Read this article, and also look for an explanation of the filter context: www.sqlbi.com/articles/using-allexcept-versus-all-and-values/

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

    Hi and thanks for the info. I tried it in ma test file and it's now working properly - formula for "always red" gives me the result as in "only red" (instead of showing all values it shows only one) and to get this result i need to use ALL with FILTER (as in "only red values ext") . Yeah, it's working, but the opposite way. Any ideas why this might happen?

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

      Got the same issue yesterday and was stumped for a while.Finally realised the culprit was the sorting of a column in the visual by another column of the same table.Then I remembered Alberto had posted a video on that some while ago.
      Can’t paste the link for some reason now, if you ‘d like to check it out you can search for: “side effects of sort by column”.

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

    Then, "only red Values" is no more but "only red Summarize" instead 😉 But I understand the pedagocial purpose !

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

    What if have a scenario where I'm trying to show blank values as zeros?

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

      Just use "+ 0" in the measure.

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

    Can you recommend a power Bi course. RUclips videos are great but you end up just copying along. Thank you.

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

      See www.sqlbi.com/training

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

    Sir share dataset

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

      Use the link in the video description.