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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
iamriz
Helper II
Helper II

How can I customize Date x-axis label in a bar graph (eg. Have "▲ Jan 2020" for day 1 in Jan 2020)?

Hello, I have created a sample PBIX practice file (see this link plz) with dates and daily data. I wanted to show "▲ Jan 2020" or have it shown in below target bar graphs (please see pic below), instead of the current "Jan 2020" as x-axis label. This is in order that I will be able to easily identify which daily bar in the graph is Jan 1, 2020 (or day 1 of each month). It would just be easier to do conditional formatting (eg. go for different bar color if it's day 1 of each month), the problem is there are days that the daily count is 0 so it would still be hard to determine which is day 1. Any suggestion on how I can implement this would be highly appreciated. Thank you!

 

qa1.jpg

 

1 ACCEPTED SOLUTION
mwegener
Most Valuable Professional
Most Valuable Professional

Hi @iamriz ,

 

try this measure to fill the free space of the bar.

first of Month =
IF (
    DAY ( SELECTEDVALUE ( 'Table'[Date] ) ) = 1,
    MAXX (
        SUMMARIZE (
            ALLSELECTED ( 'Table' ),
            'Table'[Date],
            "@Daily Count", SUM ( 'Table'[Daily Count] )
        ),
        [@Daily Count]
    )
        - SUM ( 'Table'[Daily Count] ),
    BLANK ()
)

 

 

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast - Power BI Tutorials


View solution in original post

2 REPLIES 2
mwegener
Most Valuable Professional
Most Valuable Professional

Hi @iamriz ,

 

try this measure to fill the free space of the bar.

first of Month =
IF (
    DAY ( SELECTEDVALUE ( 'Table'[Date] ) ) = 1,
    MAXX (
        SUMMARIZE (
            ALLSELECTED ( 'Table' ),
            'Table'[Date],
            "@Daily Count", SUM ( 'Table'[Daily Count] )
        ),
        [@Daily Count]
    )
        - SUM ( 'Table'[Daily Count] ),
    BLANK ()
)

 

 

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast - Power BI Tutorials


Hi @mwegener , thanks for the help. Your suggestion, along with some tweaks, will suffice. 🙂 

 

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Top Solution Authors