Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
hima2002
Microsoft Employee
Microsoft Employee

Change date on X-axis to be monthly/daily/yearly instead of showing every run individually

I have this chart that shows if a run has succeeded or failed, the graph currently shows every run individually on the X-axis. I would like to have the option to change it to a monthly view or yearly or daily and to have it show the percentage of failed to succeeded in that time frame instead of showing them for each job. Can I get some help with this?

Screenshot (23).png

2 ACCEPTED SOLUTIONS
hnguy71
Super User
Super User

@hima2002 ,


You would need a minimum of three columns in your date table. Similar to this:

hnguy71_0-1664718181913.png

 

Then click on Modeling > New Parameter > Fields

hnguy71_1-1664718231759.png

 

Then add/drag your fields from your date table to the left box.

hnguy71_2-1664718298091.png

 

Then finally add the new "Fields" value into your X-Axis of your visual. You should be able to switch it like so

2022-10-02_08h46_57.gif

 



Did I answer your question?
Please help by clicking the thumbs up button and mark my post as a solution!

View solution in original post

@hima2002 OK, so if you want to turn on auto time intelligence, in the Desktop you go to File, Options and settings, Options and then under CURRENT FILE choose Data Load and check the box for Auto date/time:

Greg_Deckler_0-1664720541733.png

If you want to create calculated columns, in your Fields pane, right click the table and choose New column and paste in the DAX code I provided. Note, the code is for 4 separate columns, Year, Month, MonthSort and Day. Then, right-click the table and choose New measure and paste in the DAX measure code provided.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

8 REPLIES 8
hnguy71
Super User
Super User

@hima2002 ,


You would need a minimum of three columns in your date table. Similar to this:

hnguy71_0-1664718181913.png

 

Then click on Modeling > New Parameter > Fields

hnguy71_1-1664718231759.png

 

Then add/drag your fields from your date table to the left box.

hnguy71_2-1664718298091.png

 

Then finally add the new "Fields" value into your X-Axis of your visual. You should be able to switch it like so

2022-10-02_08h46_57.gif

 



Did I answer your question?
Please help by clicking the thumbs up button and mark my post as a solution!
hima2002
Microsoft Employee
Microsoft Employee

Thanks for the quick response !

However my dates are currently in this format. How can I change them so that I am able to choose the desired granularity.

Screenshot (25).png

@hima2002 You can create the columns as I posted or you can turn on Auto-Time Intelligence (I wouldn't recommend the latter)



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Yes but i have a very large amount of data, changing it to the proposed format would take a long time to do indivually. Is there a way to change automatically?

@hima2002 I don't understand why it would take a long time. Creating DAX columns generally takes mere seconds to calculate. If you turn on auto-time intelligence that would automatically generate a hierarchy for any Date or Date/time column. I guess you could consider that "automatic". The downside is that it can really bloat your data model. I've shrunk data models by up to 40% by just turning off auto-time intelligence.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Im new to PowerBi so i dont know exactly how to do that.

@hima2002 OK, so if you want to turn on auto time intelligence, in the Desktop you go to File, Options and settings, Options and then under CURRENT FILE choose Data Load and check the box for Auto date/time:

Greg_Deckler_0-1664720541733.png

If you want to create calculated columns, in your Fields pane, right click the table and choose New column and paste in the DAX code I provided. Note, the code is for 4 separate columns, Year, Month, MonthSort and Day. Then, right-click the table and choose New measure and paste in the DAX measure code provided.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Greg_Deckler
Community Champion
Community Champion

@hima2002 So, create columns for Month, Year and Day:

Year = YEAR([Date])

Month = FORMAT([Date],"mmmm")

MonthSort = MONTH([Date])

Day = DATE(YEAR([Date]),MONTH([Date]),DAY([Date]))

Then a measure something like:

Measure =
  VAR __Total = COUNTROWS('Table')
  VAR __Failed = COUNTROWS(FILTER('Table',[Status] = "Failed"))
RETURN
  DIVIDE(__Failed, __Total, 0)


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors