+ Reply to Thread
Results 1 to 11 of 11

Power BI - My YTD Visuals unable to breakdown into Months

  1. #1
    Registered User
    Join Date
    12-21-2014
    Location
    singapore
    MS-Off Ver
    2016
    Posts
    42

    Power BI - My YTD Visuals unable to breakdown into Months

    Hi everyone. So i have my YTD sales by Year Hierachy. The Month slicer will change the YTD figures accordingly. That is all fine.
    Mth breakdown 1.PNG

    But when i click on the down arrow icon on the visual to drill down and choose a certain year, it doesn't give me the all the months in the year but just the selected month in the slicer.
    Mth breakdown 2.PNG

    how do i choose a year and show all the months of data?

  2. #2
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Power BI - My YTD Visuals unable to breakdown into Months

    Clear your month slicer?

    You're saying "I've filtered months, and now I can only see one month. How do I see all months?"
    let Source = #table({"Question","Thread", "User"},{{"Answered","Mark Solved", "Add Reputation"}}) in Source

    If I give you Power Query (Get & Transform Data) code, and you don't know what to do with it, then CLICK HERE

    Walking the tightrope between genius and eejit...

  3. #3
    Registered User
    Join Date
    12-21-2014
    Location
    singapore
    MS-Off Ver
    2016
    Posts
    42

    Re: Power BI - My YTD Visuals unable to breakdown into Months

    there's no workaround to do that? it's set the way it is because of my lack of knowledge. but a different setup could achieve my goal?

    in simple terms, i want to see YTD based on a month selection. but i also want to select the chart and see the breakdown. if i simply clear the month slicer, i would see Jan to Dec for the particular year, and not up to the month i selected.

  4. #4
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Power BI - My YTD Visuals unable to breakdown into Months

    You could achieve this by having an unrelated calendar table for your chart x-Axis, and a measure which compares the unrelated month with the slicer month, returning BLANK() if unrelated month > sliced month, otherwise returning your desired measure value.

    Or you could simply use a "between" slicer on the related month number.

  5. #5
    Registered User
    Join Date
    12-21-2014
    Location
    singapore
    MS-Off Ver
    2016
    Posts
    42

    Re: Power BI - My YTD Visuals unable to breakdown into Months

    using the "between" slicer, i managed to get the results.

    but i love to use the Month slicer instead, so i experimented with what you advised. couldn't quite get it though.
    Month Slicer using the related calendar table?
    used unrelated calendar table for x-axis as advised.
    unable to get the measure. i don't know a function to compare between 2 different tables.

    tried:
    New Sales YTD = IF(
    doesn't allow a table name.

    tried:
    New Sales YTD = CALCULATE([Sales YTD],CalendarUnrelated[Month Num]<=
    doesn't allow a table name again.

    tried:
    New Sales YTD = CALCULATE([Sales YTD],FILTER(CalendarUnrelated,CalendarUnrelated[Month Num]<=
    doesn't allow ANOTHER table name.

    here's the pbix file if it helps:
    https://easyupload.io/m6pn9w

    thank you!
    Attached Files Attached Files
    Last edited by Jaelah; 12-13-2019 at 04:45 AM. Reason: zipped pbi file

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,894

    Re: Power BI - My YTD Visuals unable to breakdown into Months

    Please attach the file here - change its extension from .pbix to .zip in order to upload it.

    I cannot download from the file-sharing site without becoming a member, and I am not going to do that - sorry.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  7. #7
    Registered User
    Join Date
    12-21-2014
    Location
    singapore
    MS-Off Ver
    2016
    Posts
    42

    Re: Power BI - My YTD Visuals unable to breakdown into Months

    sure, Ali. i have added the zipped file.

  8. #8
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Power BI - My YTD Visuals unable to breakdown into Months

    Change your slicer to use CalendarUnrelated[Month].

    Change the X-Axis of your Chart to use Calendar[Year Hierarchy].

    Add a measure:
    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    12-21-2014
    Location
    singapore
    MS-Off Ver
    2016
    Posts
    42

    Re: Power BI - My YTD Visuals unable to breakdown into Months

    i have a feeling it's a stupid mistake i missed out but i just can't seem to figure out. did what you said and the chart is empty.

    tried to breakdown the different parts.
    MAX ( 'Calendar'[Month Num] )
    this will always give me 12 right? since the slicer is based on CalendarUnrelated[Month Num], it is never filtered down.

    MAX ( CalendarUnrelated[Month Num] )
    this changes accordingly to the slicer.

    so 12 is always going to be greater than whatever month in the slicer (except Dec) no? and it will show a blank when true.

    i tried using <= instead of >. i get the chart but every month shows Jan-Dec YTD.
    Attached Files Attached Files
    Last edited by Jaelah; 12-13-2019 at 06:33 AM. Reason: added attachment

  10. #10
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Power BI - My YTD Visuals unable to breakdown into Months

    MAX ( 'Calendar'[Month Num] ) will change based on evaluation context. Each category of the chart's x-axis returns a different maximum month number.

    Your attached PBIX file works when drilled to Month.

    We need a different approach, if we want to calculate the YTD sales for a selected month at the year level, as well as for each prior month, within the same measure.

    Try this:

    Please Login or Register  to view this content.

  11. #11
    Registered User
    Join Date
    12-21-2014
    Location
    singapore
    MS-Off Ver
    2016
    Posts
    42

    Re: Power BI - My YTD Visuals unable to breakdown into Months

    wow. didn't think it will be complicated. thanks again, olly!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Unable to resolve timeout in Power Query
    By dtrom26 in forum Excel General
    Replies: 6
    Last Post: 11-28-2019, 11:35 AM
  2. Power point visuals using Excel
    By hawkbase85 in forum PowerPoint Formatting & General
    Replies: 0
    Last Post: 07-07-2019, 11:10 AM
  3. Sub-Forum for Excel Power Tools (Power Query, Power Pivot & Power BI)
    By chullan88 in forum Suggestions for Improvement
    Replies: 10
    Last Post: 06-28-2018, 02:25 PM
  4. [SOLVED] unable to rank 5 months
    By Shellybelly in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-15-2014, 02:02 AM
  5. Unable to create meaningful relationship in Power Pivot
    By Melvinrobb in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 01-08-2014, 10:28 AM
  6. [SOLVED] Breakdown the revenue by months
    By Thet4444 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-21-2012, 02:03 AM
  7. Breakdown Months-to-Days-Hours & Back?
    By mycon73 in forum Excel General
    Replies: 4
    Last Post: 02-26-2011, 12:55 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1