Counting consecutive days with sales - Unplugged #47

แชร์
ฝัง
  • เผยแพร่เมื่อ 19 ธ.ค. 2024

ความคิดเห็น • 29

  • @obazeeghosa
    @obazeeghosa ปีที่แล้ว +1

    This follow-up to Unplug #18 is even greater in execution and delivery. Simply Excellent!!!

  • @aleferresbruyn
    @aleferresbruyn ปีที่แล้ว +4

    The way you unbundled a quite complicated measure in a simple way is superlative.

  • @timolff9239
    @timolff9239 ปีที่แล้ว +2

    ''the algorithm is quite simple, but it's worth it to see how it works!" ;D
    Thanks for this demo!

  • @DailyVibz
    @DailyVibz ปีที่แล้ว +1

    From the Result , how can we remove public holidays and weekends if we want to ?

  • @ed2921
    @ed2921 ปีที่แล้ว +1

    You run out superlatives watching Sqlbi, another brilliant video gents

  • @beckyjohnson7505
    @beckyjohnson7505 ปีที่แล้ว +1

    Hi Alberto - This has been very helpful in getting me to a certain point. However, I would like to get your take on a next step. I'm trying to calculate the consecutive days (similar to the days with sales) between the last day an employee didn't work and the next day an employee didn't work. The desired outcome would be for a count of consecutive days between those two "blank" days (i.e. 1, 2, 3, 4, 5, etc.). This will then be used to determine how many times a colleague worked more than a certain number of days. I have tried using / modifying the code used in this video, but have had limited luck. There is an index, employee id, date, date worked and count of day worked in the dataset. I'm happy to share a test .pbix if you have any ideas. Thanks for all your help. I find your videos very informative!

  • @tayeebsyed2062
    @tayeebsyed2062 ปีที่แล้ว +2

    Thank you so much for the insightful video.
    Suppose, I want to calculate the consecutive working days for staff & report on each individual staff to ensure they don’t run into fatigue. How to make the above algorithm concept to work in such situation?
    Field are: Staff Name, Work date, No. of Hours worked.

    • @stephenreade1623
      @stephenreade1623 ปีที่แล้ว

      I am also trying to find a solution to this problem. Does anyone know how I can display the current consecutive days worked for all employees?

  • @matthewshotton86
    @matthewshotton86 หลายเดือนก่อน

    Hello - Great video! How might you do this for a monthly scale?
    This is working perfectly for days, but would be brilliant at a monthly e.g., Jan: 1 Feb: 2 and so on.
    Thanks!

    • @SQLBI
      @SQLBI  หลายเดือนก่อน

      You should create a consecutive month number in Date and count the unique values there. For examples of Date tables like that look at www.daxpatterns.com/time-patterns/

  • @mabl4367
    @mabl4367 ปีที่แล้ว +1

    Hmmm. I have two objections to this measure.
    1. The VAR AllDates =ALL('Date'[Date]) should be ALLSELECTED('Date'[Date]) right? If not it will not take into account any dates filtered out by the user.
    2. The calculation for the number of days without holes is preformed by subtracting dates. This to will not take into account any dates the user may wish to exclude from the calculation. The number of days without holes should be done by COUNTROWS if you as me :)

  • @simonq2770
    @simonq2770 ปีที่แล้ว +1

    Superb video just amazed with the dax. could we please have one video on sales projected for the month based on sales days and sales run rate. Many thanks

  • @stevenwang4064
    @stevenwang4064 ปีที่แล้ว +1

    Hi Alberto, I have a question. Assuming the VERY FIRST date in your Date table, e.g., 2017-01-01, has sales, what will be the NearestHole value when the date in the report is also 2017-01-01? It appears under this situation, NearestHole will return blank. Therefore, Results= INT ( "2017-01-01" - blank ) . Right? So I guess we should add a IF condition to include such condition. Also, how about All dates in Date table have sales, which means we have no hole at all? DatesWithNoSales will be an empty table. NearestHole will return Blank. Right? Thank you.

  • @mikeycbd
    @mikeycbd 10 หลายเดือนก่อน

    Hi, would it be possible please to modify this code to look at all dates and dates from another table where people have taken personal leave so we count episodes of leave instead of episodes of Sales? (for Calculating Bradford Scores)

  • @mariakatsanevas8300
    @mariakatsanevas8300 ปีที่แล้ว

    How would this work for consecutive month ends. Not a text month column but the month end 1/31/2013

  • @gauripande-jn4bw
    @gauripande-jn4bw 6 หลายเดือนก่อน

    I WANT TO SHOW CONSECUTIVE INCREASE IN 5 DAY OR 10 DAY IN POWER BI HOW CAN I DO THESE

  • @samuelkiarie325
    @samuelkiarie325 ปีที่แล้ว

    Hello SQLBI
    Have you listed any of your courses in udemy, share the link

    • @SQLBI
      @SQLBI  ปีที่แล้ว +1

      You can find our free and commercial courses here: www.sqlbi.com/training

  • @allmazd
    @allmazd ปีที่แล้ว

    Hello Alberto. Sorry for my question not related to the topic, but I want to know your opinion, in this modern world and dax domination should I also start studying another concept as mdx and cubes or it will not have a bright future? I ask you because I know that you are familiar with the topic, thank you very much for your answer in advance.

    • @SQLBI
      @SQLBI  ปีที่แล้ว +1

      MDX did not evolve in the last few years. It's still used by Excel also when querying Tabular models, or by other tools that use MDX as a query language. However, its adoption is certainly not raising today.

  • @majedalhussan3082
    @majedalhussan3082 ปีที่แล้ว +1

    brilliant as always

  • @zxccxz164
    @zxccxz164 10 หลายเดือนก่อน

    The file on your web site links to wrong file. Can u please fix

    • @SQLBI
      @SQLBI  10 หลายเดือนก่อน

      The file seems correct.

    • @zxccxz164
      @zxccxz164 10 หลายเดือนก่อน

      @@SQLBI it is not. you can even just read the title Consecutive-days-with-no-sales.zip (3.81 MB) NO SALES. this is a different video and blog on consecutive days WITH SALES. It is not the same file

    • @SQLBI
      @SQLBI  10 หลายเดือนก่อน

      Oh thank you! It was a wrong link that we now fixed - there was a coincidence with the name of another unplugged video with a similar name. Please, let us know if it works well now!

  • @vladyslavgovorukha9229
    @vladyslavgovorukha9229 ปีที่แล้ว +1

    Brilliant!

  • @jugarGV
    @jugarGV ปีที่แล้ว +1

    Amazing!

  • @montorovegan
    @montorovegan ปีที่แล้ว +2

    Brilliant