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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

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
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

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

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.