skip to main content
Power BI
    • What is Power BI
    • Why Power BI
    • Customer stories
    • Data visuals
    • Security
    • Power BI Desktop
    • Power BI Pro
    • Power BI Premium
    • Power BI Mobile
    • Power BI Embedded
    • Power BI Report Server
  • Pricing
    • Azure + Power BI
    • Microsoft 365 + Power BI
    • Dynamics 365 + Power BI
      • Energy
      • Healthcare
      • Manufacturing
      • Media
      • Retail
    • For analysts
    • For IT
      • Overview
      • Embedded analytics
      • Power BI visuals
      • Automation
      • Documentation
      • Community
    • Partners Overview
    • Solutions Partners
    • BI Specialized Partners
    • Power BI CSOs
    • Fabric Partner Community
    • Training
    • Getting started
      • Overview
      • Self-guided learning
      • Webinars
      • Documentation
      • Roadmap
      • Overview
      • Issues
      • Give feedback
    • Blog
    • Business intelligence topics
    • Overview
    • Forums
    • Galleries
    • Submit ideas
    • Events
    • User groups
    • Community blog
    • Register
    • ·
    • Sign in
    • ·
    • Help
    Go To
    • Power BI forums
    • Updates
    • News & Announcements
    • Get Help with Power BI
    • Desktop
    • Service
    • Report Server
    • Power Query
    • Mobile Apps
    • Developer
    • DAX Commands and Tips
    • Custom Visuals Development Discussion
    • Health and Life Sciences
    • Power BI Spanish forums
    • Translated Spanish Desktop
    • Power Platform Integration - Better Together!
    • Power Platform Integrations
    • Power Platform and Dynamics 365 Integrations
    • Training and Consulting
    • Instructor Led Training
    • Galleries
    • Community Connections & How-To Videos
    • COVID-19 Data Stories Gallery
    • Themes Gallery
    • Data Stories Gallery
    • R Script Showcase
    • Webinars and Video Gallery
    • Quick Measures Gallery
    • 2021 MSBizAppsSummit Gallery
    • 2020 MSBizAppsSummit Gallery
    • 2019 MSBizAppsSummit Gallery
    • Events
    • Ideas
    • Custom Visuals Ideas
    • Issues
    • Issues
    • Events
    • Upcoming Events
    • Community Engagement
    • T-Shirt Design Challenge 2023
    • Community Blog
    • Power BI Community Blog
    • Custom Visuals Community Blog
    • Community Support
    • Community Accounts & Registration
    • Using the Community
    • Community Feedback
    cancel
    Turn on suggestions
    Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
    Showing results for 
    Search instead for 
    Did you mean: 

    Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

    • Power BI forums
    • Galleries
    • Data Stories Gallery
    • Re: Create Dynamic Periods for Fiscal or Calendar ...

    Re: Create Dynamic Periods for Fiscal or Calendar Dates and Dynamic Month Names for Charts

    07-11-2017 20:03 PM

    ayami123
    Helper I
    11014 Views
    LinkedIn LinkedIn Facebook Facebook Twitter Twitter
    GilbertQ
    Super User GilbertQ
    Super User
    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Report Inappropriate Content

    Create Dynamic Periods for Fiscal or Calendar Dates and Dynamic Month Names for Charts

    ‎09-06-2016 10:27 PM

    For this data story, my first goal was to be able to create any Date Period that was required for the data. As with the example we have creaated a few simple Periods "CY-LY" (Calendar Year - Last Year), "CY-YTD" (Calendar Year - Year to Date). And in doing so, it gives the user the ability quickly slice their data by the defined period.

     

    Second to this I also created a solution in which the Month Names would dynamically change to either the Fiscal Months (If a Fiscal Period was selected) or Calendar Months (If a Caleandar Period was selected).

     

    So in the report if you click on "CY-YTD", you will see that the dates follow "Jan-May"

    Whilst if you click on "FY-LY", you will see that the dates follow the Fiscal Periods "Nov - October"

     

    The final part of the data story is that using the Periods, it makes it very easy to create Calculated Measures based on your custom periods. And his is a lot easier and quicker when your custom periods do not have built in DAX functions.

     

    In doing so that this does is it enables the user to have the ability to quickly and easily slice their data based on custom periods.

     

    I have also published a blog post in terms of how I achieved this.

     

    Create Dynamic Periods for Fiscal or Calendar Dates in Power BI

     

     

     

     

     

    eyJrIjoiZGNjNGUzM2ItZWVhOS00ZWRlLWFlZmEtZjljMDZlMmNmMTY0IiwidCI6ImQ3MGI0ZDU1LWE1OTItNDVmMi05OWYzLTI5OWFlNWVlN2FkZSJ9





    Did I answer your question? Mark my post as a solution!

    Proud to be a Super User!







    Power BI Blog

    Preview file
    148 KB
    Labels:
    • Labels:
    • Business
    • Economics
    • Entertainment
    • Lifestyle
    • Technology
    Message 1 of 16
    34,573 Views
    27
    Reply
    • All forum topics
    • Previous Topic
    • Next Topic
    amirsheva
    amirsheva
    New Member
    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Report Inappropriate Content

    ‎06-15-2022 03:26 AM

    Hello, please could you send  me the PBIX File.

    khakdoustamir@gmail.com

      Many thanks.

    Message 15 of 16
    3,348 Views
    2
    Reply
    GilbertQ
    Super User GilbertQ
    Super User
    In response to amirsheva
    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Report Inappropriate Content

    ‎06-16-2022 05:39 PM

    Hi @amirsheva 

     

    If you click on the blog post, and then go to the end you will see the option to download the PBIX





    Did I answer your question? Mark my post as a solution!

    Proud to be a Super User!







    Power BI Blog

    Message 16 of 16
    3,311 Views
    0
    Reply
    estapeace
    estapeace
    Regular Visitor
    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Report Inappropriate Content

    ‎10-09-2018 08:59 AM

    Do you offer Power BI classes?

    Message 13 of 16
    10,656 Views
    0
    Reply
    GilbertQ
    Super User GilbertQ
    Super User
    In response to estapeace
    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Report Inappropriate Content

    ‎10-09-2018 05:58 PM
    Hi there, I currently do not, but it depends what your requirements are and the number of people willing to attend.




    Did I answer your question? Mark my post as a solution!

    Proud to be a Super User!







    Power BI Blog

    Message 14 of 16
    10,647 Views
    0
    Reply
    Anonymous
    Not applicable
    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Report Inappropriate Content

    ‎10-08-2016 12:08 AM

    Very good dashboard and financial calender is what a lot of companies use.

     

    What did you use to publish this dashboard into a webpage.

    I am new to this environment.

     

    regards

    willy

    Message 7 of 16
    33,710 Views
    0
    Reply
    GilbertQ
    Super User GilbertQ
    Super User
    In response to Anonymous
    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Report Inappropriate Content

    ‎10-08-2016 12:17 AM
    Hi there.

    I am glad you found it useful. I do also have a blog post and pbix file explaining how I achieved this.

    The feature is called publish to web after you upload your Power BI desktop file to the Power BI service. You can then click on file and then Publish to Web.

    Just note that when you publish to web it is available for anyone who has access to the link.




    Did I answer your question? Mark my post as a solution!

    Proud to be a Super User!







    Power BI Blog

    Message 8 of 16
    33,707 Views
    0
    Reply
    ayami123
    ayami123 Helper I
    Helper I
    In response to GilbertQ
    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Report Inappropriate Content

    ‎07-11-2017 04:13 AM
    let
    
    TodaysDate = Date.From(DateTimeZone.FixedUtcNow()),
    
    YearText = Number.ToText(2000),
    
    FiscalStartMonth = Date.Month(Date.FromText(“”&YearText&”-“&#”Fiscal Start Month”&“”)),
    
    FiscalStartMonthDay = Date.Day(Date.StartOfMonth(Date.FromText(“”&YearText&”-“&#”Fiscal Start Month”&“”))),
    
    FiscalEndMonth = Date.Month(Date.FromText(“”&YearText&”-“&#”Fiscal End Month”&“”)),
    
    FiscalEndMonthDay = Date.Day(Date.EndOfMonth(Date.FromText(“”&YearText&”-“&#”Fiscal End Month”&“”))),


    where did he edit this, =_= I don't know where I couldn't replicate the example =_=

    Message 9 of 16
    27,769 Views
    0
    Reply
    GilbertQ
    Super User GilbertQ
    Super User
    In response to ayami123
    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Report Inappropriate Content

    ‎07-11-2017 03:17 PM
    Hi there, I edited this in the query editor.




    Did I answer your question? Mark my post as a solution!

    Proud to be a Super User!







    Power BI Blog

    Message 10 of 16
    27,755 Views
    0
    Reply
    ayami123
    ayami123 Helper I
    Helper I
    In response to GilbertQ
    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Report Inappropriate Content

    ‎07-11-2017 08:03 PM
    I know that you use the query editor, but you can't do that unless you click on some table, if I created some blank query, I also need to put output and it gives me error when i do that since i'm missing the output
    Message 11 of 16
    11,014 Views
    0
    Reply
    GilbertQ
    Super User GilbertQ
    Super User
    In response to ayami123
    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Report Inappropriate Content

    ‎07-11-2017 08:04 PM
    Ok thanks do you perhaps have the error, that I can have a look at?




    Did I answer your question? Mark my post as a solution!

    Proud to be a Super User!







    Power BI Blog

    Message 12 of 16
    11,013 Views
    0
    Reply
    HalilG
    HalilG
    Frequent Visitor
    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Report Inappropriate Content

    ‎09-28-2016 09:02 AM

    Very nice report. Thanks for the blog post too. May I ask what's the KPI like visual u use on page 3? Where can I find it?

    Message 4 of 16
    33,886 Views
    0
    Reply
    GilbertQ
    Super User GilbertQ
    Super User
    In response to HalilG
    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Report Inappropriate Content

    ‎09-28-2016 02:45 PM

    Hi there

     

    Thanks for the kind words. And the visual on page 3 was done by a 3rd party developer.

     

    You can contact him on contact@dax365.com his name is Nick Savenko





    Did I answer your question? Mark my post as a solution!

    Proud to be a Super User!







    Power BI Blog

    Message 5 of 16
    33,881 Views
    0
    Reply
    HalilG
    HalilG
    Frequent Visitor
    In response to GilbertQ
    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Report Inappropriate Content

    ‎09-29-2016 05:37 AM

    thank you for the information.

    Message 6 of 16
    33,847 Views
    0
    Reply
    DonAldridge
    DonAldridge
    New Member
    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Report Inappropriate Content

    ‎09-10-2016 03:03 PM
    Great blog post Gilbert. Very detailed. Thanks for sharing with the community.
    Message 3 of 16
    34,209 Views
    0
    Reply
    daandamhuis
    daandamhuis Advocate I
    Advocate I
    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Report Inappropriate Content

    ‎09-07-2016 12:07 AM

    Nice Dashboard, really like the feature which allows to select the unit of measure and the different date periods. By the way, on Page 4 there is a breakdown tree. Is it possible to share the visualization, I was searched for this since Performance Point.

    Message 2 of 16
    34,393 Views
    0
    Reply

    Power Platform

    • Overview
    • Power BI
    • Power Apps
    • Power Pages
    • Power Automate
    • Power Virtual Agents

    • Sign in
    • Sign up

    Browse

    • Solutions
    • Partners
    • Consulting Services

    Downloads

    • Power BI Desktop
    • Power BI Mobile
    • Power BI Report Server
    • See all downloads

    Learn

    • Guided learning
    • Documentation
    • Support
    • Community
    • Give feedback
    • Webinars
    • Developers
    • Blog
    • Newsletter

    © 2023 Microsoft

    Follow Power BI

    • Privacy & cookies
    • Manage cookies
    • Terms of use
    • Trademarks
    Consumer Privacy Act (CCPA) Opt-Out Icon Your Privacy Choices