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
abazzan
Helper I
Helper I

bar chart

Hello Power BI community, 

I've been trying to find an answer to the issue that I'm facing. It would be great if someone can assist me with this.

I'm working with energy consumption data from 2017 to 2022 and I am showing the current consumption as per the filtered date using a slicer and showing last year's consumption using SAMEPERIODLASTYEAR. 

 

The following is a visual of my bar chart which is working properly for FY2019, FY 2021, FY2022

bar chart 2018.PNG

bar chart 2022.png
Everything seems to work well, except when I'm showing the data for FY2019. The same issue for FY2019 is with any type of bar chart.

The barchart shows thin bars as follows:

 

bar chart 2019.PNG

1 ACCEPTED SOLUTION
cpearson
Resolver I
Resolver I

What about the related date field in the Consumption_Cost table? Is the date format of that field consistent?

View solution in original post

4 REPLIES 4
abazzan
Helper I
Helper I

Hi @cpearson, I just used the Date field from the Consumption_Cost table in the bar chart and the slicer and it worked properly for FY2019. I don't know why it was not working when using Date from the Calendar table. 


Thank you for following up!!

cpearson
Resolver I
Resolver I

What about the related date field in the Consumption_Cost table? Is the date format of that field consistent?

abazzan
Helper I
Helper I

Hi @cpearson and thank you for your response!

 

The current date has a date format and not date time because the underlying data doesn't have date times.

 

This is a screenshot of that field. date field screenshot.PNG

 

However, if I changed the date field from Date into Month, the bar chart shows properly. It is shown in the following image:

 

Month instead of Date image.PNG

 

cpearson
Resolver I
Resolver I

Is your data for that period any different? It's a strange one but the thin bars could be happening because the data is not getting aggregated into months. Is your date field a date or a datetime? Can you share a screenshot of that field?

 

If your data is formatted to something like this:

cpearson_0-1675376936300.png

but the underlying data has date times it might be causing the issue. Change the column format so you can see the dd/mm/yyyy hh:mm and see if there is any variance in the formatting across the FYs.

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.