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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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

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


View solution in original post

2 REPLIES 2

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


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

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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