Comparing with previous selected time period in DAX

Поделиться
HTML-код
  • Опубликовано: 10 фев 2025
  • This video describes how you can create a comparison with the previous time period in a visualization, regardless of whether the time periods are consecutive or not.
    Article and download: sql.bi/526183/...
    How to learn DAX: www.sqlbi.com/...
    The definitive guide to DAX: www.sqlbi.com/...

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

  • @SumanMondal-d2y
    @SumanMondal-d2y 4 месяца назад +2

    Every week a learn a new thing from this RUclips channel .Thanks a lot . This really helped me in my ongoing project .Sundays well invested

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

    What a great explanation Mr. Ferrari, thanks for sharing your amazing knowledge with the community...!

  • @mudassarhussain5424
    @mudassarhussain5424 Год назад +2

    After a whole week in finding a solution. your this video makes my work way easy. i was working on price elasticity project. as some products did not sell daily so date gap created problem to use offset to get previous date data to check change in value. I really appreciate.

  • @flikg
    @flikg 3 года назад +4

    Alberto I wish you were my professor during studies!!!!! THANK YOU SO MUCH FOR THE WORK YOU ARE DOING!!!

  • @manassehkisame6286
    @manassehkisame6286 10 месяцев назад +2

    This tutorial is Golden. I have mined and mined for days on end till this Eureka Moment @ SQLBI!

  • @passioncreativekass-sand827
    @passioncreativekass-sand827 Год назад +1

    TROP TOP, je cherchais depuis 10 jours et j'allais abandonner. Merci infiniment. J'ai encore appris quelque chose.De plus la traduction ene français me permet de comprendre sans bêtement reproduire MERCI MERCI

  • @adityaupadhyay3242
    @adityaupadhyay3242 3 года назад +2

    Wow this is such a smooth and clean explanation. KeepFilters is a blessing.

  • @VladMZ
    @VladMZ 3 года назад +2

    Precious! This is exactly what I need. I have a task where Output of one stage this week is an Input for the subsequent stage next week. I already created a column with week number relative to the current week (negative in past, 0 current, positive in future), so I'll just use it for this calculation. Thank you!

  • @amarnadhgunakala2901
    @amarnadhgunakala2901 4 года назад +2

    Everyday one new thing that makes my learning keep on going, Thanks Alberto

  • @nazirakhan6530
    @nazirakhan6530 4 года назад +2

    Thanks Alberto !! Everytime you make us learn something new and exciting

  • @Phongtrung02
    @Phongtrung02 7 месяцев назад +2

    This video literally saves me from my job fired, thanks alot

  • @olivergruss6018
    @olivergruss6018 4 года назад +3

    Great Work as always - im very glad you started a youtube Channel. I hope you become the msot popular PowerBi Channel. Nobody else is more than an expert on the topic than you guys. Keep up the good work. It will pay off :)

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

    Amazing! This is a code I was searching for some time. Thank you! I follow you with admiration. Regards.

  • @brockyoutube
    @brockyoutube 3 года назад +2

    Genius, I was able to use your code as a base to what I really needed. Thanks for posting!

  • @ShabnamKhan-vk7fj
    @ShabnamKhan-vk7fj 3 года назад +2

    This is amazing. Thanks for making DAX so enjoyable for us.

  • @salvatorescofano6756
    @salvatorescofano6756 4 года назад +2

    Alberto, congratulation, This video is very strong, but you transform in easy.!!

  • @DanielADamico
    @DanielADamico 4 года назад +2

    It seems easy when it's explained by you guys! Thanks for sharing!

  • @satishkumardommeti8282
    @satishkumardommeti8282 4 года назад +1

    Alberto, you make DAX sound very simple. In fact, when I get to my keyboard to write the measure, I mostly end up missing some step. Maybe, I need more practice for sure. Cheers!!!

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

    thanks a lot for sharing this. may i know how to compute the growth/variance for this case for selected months too?

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

    Just amasing! THANKS A LOT!!!

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

    Great Video ! Its Really helpful for me and I have one question
    That is In second page your slicer is Year Month Name not Year Month Number . I want to know how to do that instead month number we have to put month name in dax ?

  • @mnowako
    @mnowako 4 года назад +1

    Thank you, professor Alberto!

  • @k.b.jayakumar5136
    @k.b.jayakumar5136 2 года назад +1

    Excellent Video, Thank you Sir.

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

    Thanks Alberto 👍👍👍

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

    It works great on a table, but i have problems when i add the measure as a value in a matrix.
    I'm trying to compare the selected week with it's previous week. as selecting week 10, and showing two columns with sales form week 9 and 10

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

    Hey hi in powerbi I want to compare a value for continuous 15 mins if the value is same for 15mins continuously and I need a count 1 for that

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

    This measure doesn’t show in “Total” in the table. Is there a way to have sub/total as well? Many thanks

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

    Thanks for sharing, this is really useful and amazing.
    I just have a question, if in my report, i have several slicers. How can i modifiy the mesure? the target is the comparaison calculates with these choices of slicers

  • @mohammed333suliman
    @mohammed333suliman 4 года назад +1

    Thank you Alberto

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

    Hi
    Thank you for the video. I am trying to get a variance for two different time period and the time period is selected basis the end user. Like in the video.
    Do advise on the same.

  • @sbn4862
    @sbn4862 3 года назад

    Hi Mr Alberto I can't sort my Year Month in another my table, No YearNumber and YearMonthNumber can help.

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

    sir i have a problem which i wanted to slove that is i wanted to compare between different periods like last 7 days, 14, 30 & Month to date with previous month to date but all these option should be on slicer and the all visuals which resides in the page should reflect the output please suggest me how to do i have tried but i am unable to do it.

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

    This was amazing ! I've used this in my retail 4-5-4 data model but I'm very confused on what I need to change in the previous month formula. When I don't use any filters on my output, it works beautifully! The second I try and filter anything on the visual, it returns in accurate data . I know it has something to do with filter context Inside but I can't understand. Can you or anyone help?

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

      For 4-5-4 look at the formulas here: www.daxpatterns.com/week-related-calculations/

  • @Bharath_PBI
    @Bharath_PBI 4 года назад +1

    Thanks again for another video. 👍

  • @pawewrona9749
    @pawewrona9749 4 года назад +1

    Thank you for another great video!

  • @kkelinaa
    @kkelinaa 4 года назад +1

    Thank you for useful informations.

  • @Vitor-hb8dt
    @Vitor-hb8dt 2 года назад +1

    AMAZING! It helped me a lot!!!

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

    Does it work between years?like dez21 Vs Jan22

  • @1yyymmmddd
    @1yyymmmddd 4 года назад +1

    Great, as always. Thanks !

  • @l3ol3lca
    @l3ol3lca 4 года назад +1

    Thank You!

  • @akki4718
    @akki4718 3 года назад

    in case if there is total we have to show based on selection then?

  • @athandapani
    @athandapani 4 года назад +1

    Very good example 👍

  • @Usuario-gk1ni
    @Usuario-gk1ni 3 года назад +1

    thanks!!!

  • @pravinupadhyay2046
    @pravinupadhyay2046 4 года назад

    Very good, i was thinking if we have suppose products or brands in the place of month year ???

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

      Potentially you could use a similar approach - but in which case you compare a product with the previous product? And you don't have the notion of "periods" there.

    • @pravinupadhyay2046
      @pravinupadhyay2046 4 года назад +1

      @@SQLBI thankyou for your response, I got your point, if products are ranked then I can use that rank as a notion for selected previous product.

  • @felipesignorellireis7839
    @felipesignorellireis7839 4 года назад +1

    Very good. Thanks

  • @Ladiesman7790
    @Ladiesman7790 3 года назад

    Do you using a heatmap instead?

  • @Knud451
    @Knud451 4 года назад

    Thanks. Sorry for posting the question here. Is it possible to make the names of measures dynamic? If so, can you do a video on it? It would really help in visualising/explaining some reports I have.

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

      No, measure and column names are defined in the model and cannot change. You can dynamically change the title of a visual in a report, though.

    • @Knud451
      @Knud451 4 года назад

      @@SQLBI thanks. The thing is that I have several measures in the visual and they all need to change independently of each other.

  • @ravi__negi__4333
    @ravi__negi__4333 26 дней назад +1

    Ahh amazing plesse bring some real workd scerio problem in DAX...😊

    • @SQLBI
      @SQLBI  24 дня назад

      Look at www.daxpatterns.com

  • @Alan.DL7
    @Alan.DL7 4 года назад

    This is great. I have a measure that computes the same thing but after creating like 4 different measures to feed the final one...
    Now, my question is and I can't figure it out on my own sadly: how to use this measure but to display data for example by Product Category without having to add a date column in the matrix. Even if I keep the date column, as soon as I drill down to Product Category level, the measure shows only blanks.
    Any tips here, please?

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

      Try to reproduce the issue using the sample file you can download from the SQLBI website in the related article, and write your question in the comments to the article, it's easier to reply that way.

    • @Alan.DL7
      @Alan.DL7 4 года назад +1

      @@SQLBI will definitely do that, thanks! I have also purchased the Mastering DAX course. Maybe my answer will be there too :)

  • @douglasgimenez7852
    @douglasgimenez7852 4 года назад +3

    Muito bom conteudo!!!

  • @salvatorescofano6756
    @salvatorescofano6756 4 года назад

    Do you have any video explain On-premises data gateway ? instalation and configuration from a SQL Server? tks best regards

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

      We only cover DAX and data modeling - you should look at guyinacube.com/2018/01/10/premises-data-gateway-power-bi-revisited/

  • @kalinduSekara
    @kalinduSekara 4 года назад +1

    Nice

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

    Genius...

  • @LuisGonzalez-uv2ti
    @LuisGonzalez-uv2ti Год назад

    Let's say you want to compare 2023 YTD vs 2019 YTD, how would you do that?

  • @picious
    @picious 4 года назад +1

    made it!!! 1 View - on time :) ... thank you!!