Power BI - Dynamic Date Axis Granularity (Drilldown Alternative)

Поділитися
Вставка

КОМЕНТАРІ • 69

  • @mcnater
    @mcnater 3 роки тому +5

    Always a good day when another BI Elite vid drops! This a great use case where "bi-directional" isn't a bad thing. Love it.

    • @BIElite
      @BIElite  3 роки тому +1

      Haha I was thinking the same thing!

  • @satishkumardommeti8282
    @satishkumardommeti8282 3 роки тому +1

    This was exactly what I was looking for. Great, simple and elegant solution.

  • @aliseamoyseenkoisaksson6775
    @aliseamoyseenkoisaksson6775 3 роки тому

    Thank you for the great video and very pedagogical approach! Tha's exactly the user case I need to fix today. Going to share this to my colleagues.

  • @erikdessiex1026
    @erikdessiex1026 3 роки тому +1

    The way you implemented the "visual date" column is really clever ! Very interesting video. Thanks !

  • @hadriennouschi8561
    @hadriennouschi8561 Рік тому +4

    Hello all!
    To add the weekly aggregation:
    ADDCOLUMNS( CALENDAR(MIN('Data'[Date]),MAX('Data'[Date])),"Visual Date", [Date] - WEEKDAY([Date],2)+1,"Type", "Weekly", "Order",2),

    • @carloxfcddsm183
      @carloxfcddsm183 Рік тому

      Thanks a lot do you have the fomula for the quarterly aggregation?

  • @myong4317
    @myong4317 2 роки тому +5

    When the slicer is selected on "Yearly", I got the date axis with the label "Jan 2011", "Jun 2011", "Jan 2012", "Jun 2012" instead of just "2011" and "2012". Is there any way that I can solve this?

    • @terence3787
      @terence3787 Рік тому +1

      I am having the same issue. Any fixes discovered?

  • @meirco16
    @meirco16 Рік тому

    Thank you for a great lesson

  • @hagargreif
    @hagargreif Рік тому

    Wonderful!! Many thanks

  • @georgefrewin2343
    @georgefrewin2343 2 роки тому +1

    Hey, thanks for the vid.
    When I set up the yearly grain (at 7:13) i get all the month of 2019 but all the sales values showing in Jan. the rest of the months are there but with 0 values.
    Any ideas where i'm going wrong?

  • @julioandrezago1801
    @julioandrezago1801 3 роки тому +9

    I added a little tweak to the solution, for date formatting:
    -- Changing visual date formate based on granularity:
    ADDCOLUMNS (
    CALENDAR ( MIN ( 'Calendar'[Date] ), ( MAX ( 'Calendar'[Date] ) ) ),
    "Visual Date", FORMAT ( [Date], "mmm" ) & "/"
    & FORMAT ( [Date], "yy" ),
    "Order By", FORMAT([Date],"yyyy") & "/" & FORMAT([Date],"MM"),
    "Type", "Mensal",
    "Order", 2
    ),
    ADDCOLUMNS (
    CALENDAR ( MIN ( 'Calendar'[Date] ), ( MAX ( 'Calendar'[Date] ) ) ),
    "Visual Date", FORMAT([Date],"yyyy"),
    "Order By", FORMAT([Date],"yyyy"),
    "Type", "Anual",
    "Order", 3
    And don't forget to order the Visual Date column by the "Order By" column so you get correct data on your visuals. Hope this helps!

    • @terence3787
      @terence3787 Рік тому

      If the Value Date are formatted like this, the chart's X-axis will become categorical. And if the chart is too narrow, the dreaded scrollbar will show up. Any ways to fix this?

  • @thereal_jasonleong
    @thereal_jasonleong 3 роки тому +1

    coming from reddit, great video, subscribed!

    • @BIElite
      @BIElite  3 роки тому

      Awesome Jason, welcome!

  • @oliver3787
    @oliver3787 2 роки тому

    Hi, grate video but I am having trouble with the sorting in the graph any suggestion. I cant find a solution for weekly and monthly dates

  • @vikrantnag86
    @vikrantnag86 2 роки тому

    Thanks for the videos. It we need to add week then how should the measure be written

  • @NotiaRS
    @NotiaRS 3 роки тому +1

    Pretty cool solution

  • @InfernoHellfire30
    @InfernoHellfire30 3 роки тому +2

    Brilliant!

    • @BIElite
      @BIElite  3 роки тому +1

      Thank you Evgeniy!

  • @leena3483
    @leena3483 3 роки тому +1

    Great video 👍🏻

    • @BIElite
      @BIElite  3 роки тому +1

      Thank you Aleena!

  • @spandanagudiseva5273
    @spandanagudiseva5273 3 роки тому +3

    How do I include quarter here

  • @sawankumar2088
    @sawankumar2088 3 роки тому

    Park I want to show sum of time taken in different project task which I'm showing in other table visual with different dataset , how can I do this?

  • @tylerpippin7168
    @tylerpippin7168 Рік тому

    How would you add Time-Comparison Intelligence to these visuals? For example I have a bar-line chart where bar shows current sales and line shows last years sales. Bars will show and adjust properly but last years sales do not show at all. Thoughts?

  • @paulabatistadesouza
    @paulabatistadesouza 3 роки тому +1

    Great solution! Drill down is really not so friendly for new users, so it's really very useful to have the filter option.
    I did not understand the TopN filter though. When your Slicer Selection is "monthly", the respective "monthly" Dynamic Date type turns "1". How do it ensure no other type will have 1 assigned as well, so the TopN will always work? Because if it is true for more than one type, and the last day is the first day of the month or year, wouldn't it be a risk of giving the wrong visualization?

  • @user-qh9df1bv2n
    @user-qh9df1bv2n 2 місяці тому

    Amazing!!!!!!!!

  • @klgyal2010
    @klgyal2010 2 роки тому

    How would I do this for weekly please?

  • @cvauvert
    @cvauvert Рік тому

    Thank you for this! I have a problem with the Visual Date format, though. It is in Text and when I try to change to date format, it "complains" and the whole thing goes "Try to fix". The Date column is correct with dd/mm/yyyy, but the Visual date is mm/dd/yyyy and not really a date format. The result is that it sorts the axis wrong.. Help 🙂

  • @zxccxz164
    @zxccxz164 2 роки тому

    nice but, how can i do this so you can switch between say ORDER DATE / SHIP DATE

  • @yousefalq61
    @yousefalq61 2 роки тому +1

    What if i was to do quarterly?

  • @sadinenim5360
    @sadinenim5360 2 роки тому

    How will I do the same thing in excel data model. it was returning the dates instead of years and months.

  • @radekou
    @radekou 3 роки тому +1

    Neat trick

  • @dennismul4523
    @dennismul4523 2 роки тому +1

    Nice work. Could you include week as an extra level in this model? And would it work without scroll bars? That would be amazing.

    • @hadriennouschi8561
      @hadriennouschi8561 Рік тому

      ADDCOLUMNS( CALENDAR(MIN('Data'[Date]),MAX('Data'[Date])),"Visual Date", [Date] - WEEKDAY([Date],2)+1,"Type", "Weekly", "Order",2),

  • @catnapwat
    @catnapwat 3 роки тому +3

    I got to about 9:05 and my head exploded

    • @BIElite
      @BIElite  3 роки тому +2

      Lol, I spent hours on this solution so I know what you mean

  • @brianwu9328
    @brianwu9328 2 роки тому

    Mind blowning. But its not working with DATEADD function which cant do yoy comparison. Hope can figure out how to fix this.

  • @AMITKUMARTRIPATHYtheboss
    @AMITKUMARTRIPATHYtheboss 3 роки тому +1

    Really Cool trick ,
    I just want to understand if you have any vedio handling relationships between multiple tables inside a model

    • @BIElite
      @BIElite  3 роки тому +1

      Hi Amit, I don't think I have any videos on this directly. I would recommend SQLBI for their content on relationships.

    • @AMITKUMARTRIPATHYtheboss
      @AMITKUMARTRIPATHYtheboss 3 роки тому

      @@BIElite Thanks

  • @PratikshaDhanawade
    @PratikshaDhanawade Рік тому

    Can anyone help on adding a quarter in the type

  • @mahathmasadineni2884
    @mahathmasadineni2884 2 роки тому

    I have this doubt how it is months and years we have date only in visual date field can you please tell me.

  • @nick-youraverageamericanda7813

    I set this up, but on the yearly button, it's pulling in the months still and showing as blank, with the yearly totals showing in Jan of each year. Any idea why that could be happening? Best I can tell difference wise, is my dates in the tables are hierarchy based and I don't yours are in this video.

    • @juniorexperience
      @juniorexperience Рік тому

      I had the same issue. Here is the steps it tooks to get round:
      ADDCOLUMNS(
      CALENDAR(MIN(Data[Data]), MAX(Data[Data])),
      "Visual Date", FORMAT([Date], "yyyy"),
      "Type", "Yearly",
      "Order", 3
      )

  • @carloxfcddsm183
    @carloxfcddsm183 Рік тому

    hello, anyone know how to get the Quarter Granularity?

  • @Thursdaysaretheworst
    @Thursdaysaretheworst 3 роки тому +1

    I am stuck on how to include quarter into the Visual Date Column. Any help would be appreciated.

  • @thierrythomas6640
    @thierrythomas6640 3 роки тому +1

    Just one word : awesome !
    I begin in PowerBI : how many years it needs to do something like that ?

    • @BIElite
      @BIElite  3 роки тому

      Thanks Thierry! Follow along with the video instructions and you will be able to implement it today :)

    • @thierrythomas6640
      @thierrythomas6640 3 роки тому

      @@BIElite I did it and it works well. In fact my question was : how long did you work with Power BI?

  • @Mucahtkutlu
    @Mucahtkutlu 2 роки тому

    On these visuals, this method might fail when you have a "Time Comparison-Intelligence" calculation, e.g., YA (SAMEPERIODLASTYEAR).

  • @nickcleveland2810
    @nickcleveland2810 3 роки тому +2

    Anyone know what the code would be to add a column for the week to the “Dynamic Date Selection” table?
    Currently I have this code:
    =DATE(YEAR([Date]),MONTH([Date]),DAY([Date] - WEEKDAY([Date],1) +1))
    For the most part it works. However, when the date column flips to the next month during the middle of the week, the visual date calculating the start of the week messes up.
    For example, once January 2021 turns to February, it calculates the week start date of 2/1/2021 as 3/3/21.
    This is throwing me for a loop and I can’t wrap my head around why it’s doing that. Any suggestions would be welcome!

    • @jorwaar9039
      @jorwaar9039 3 роки тому

      Looking for this as well. Did you find the solution?

    • @nickcleveland2810
      @nickcleveland2810 3 роки тому +5

      Yes!
      All that’s needed is this:
      = [Date] - WEEKDAY([Date], 1) + 1
      Turns out I was needlessly complicating the formula.

    • @jorwaar9039
      @jorwaar9039 3 роки тому

      @@nickcleveland2810 Great solution, works like a charm. Thanks!

    • @manoj280in
      @manoj280in Рік тому

      @@nickcleveland2810 Thanks for this great help

  • @saratchandra7388
    @saratchandra7388 2 роки тому

    I have date hierarchy sync slicer slicer in report want to show default by 3 months on line chart and if user select on slicer it should change axis we can't use relative date slicer we can't have latest 3 months in date hierarchy slicer as if we select latest 3 months it will filter other hierarchy slicer in report page we used
    Calculate (countrows( x[column name],filter ( all( x),filter on some columns in x table) ,datebetween ( calendar[date],max( calendar[Date])- 29days ,max( calendar [Date]),Date between ( calendar[Date],max (calendar (dt)],-3,months))
    How to change dax to achieve that one we need both 3 months and full months data which sync slicer.Any help on dax would be appreciated?

  • @yashodasathuluri4098
    @yashodasathuluri4098 2 роки тому +1

    How to add weekly

    • @yashodasathuluri4098
      @yashodasathuluri4098 2 роки тому

      @@ani-lysis Thank you

    • @tarunsharma5479
      @tarunsharma5479 Рік тому

      @@yashodasathuluri4098 How can we add weekly?

    • @casseb3555
      @casseb3555 Рік тому

      How can we add weekly? Please

    • @hadriennouschi8561
      @hadriennouschi8561 Рік тому

      ADDCOLUMNS( CALENDAR(MIN('Data'[Date]),MAX('Data'[Date])),"Visual Date", [Date] - WEEKDAY([Date],2)+1,"Type", "Weekly", "Order",2),

  • @francol.dejuana7862
    @francol.dejuana7862 10 місяців тому

    I don't really recommend this tutorial. This video makes something as simple as using a slicer with the month / week column, into a large dax typing formula. This ain't helpful for new people. It's easier to just make a slicer with custom columns from the calendar table to switch filters between year / month or even week day (monday, wednesday, etc)