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
Anonymous
Not applicable

Bar chart displays data of N last months

Hi everyone, 

 

My report should display data of N last months that I could change N

 

The logic is just use data between today() and month(today()) - N

 

There is something wrong that I don't understand is the chart group data of 2 last months then shift just the label of others months. Example : the label is october but when I put the mouse on the bar just on the top of the label, it display data of september

 

I join for you the PIBX here and thank you !

https://drive.google.com/open?id=10saKmfvSFB9JptSTDc_-El-w8Pxi223N 

6 REPLIES 6
GarethWoodhouse
Resolver I
Resolver I

Hi there, can you repost your url for the PBX file as I can not access currently.

 

Thanks.

Anonymous
Not applicable

Hey,

 

Sorry for the error, here is the link and it work now 

https://drive.google.com/open?id=10saKmfvSFB9JptSTDc_-El-w8Pxi223N

 

Right - I can replicate your error using your example.

 

A way to work around it is to use the Date Hierarchy Month dimension.

Doing this I was able to Show October and only October dates are included in your bar.

 

I will investigate more to try and work out why the date itself is dounf this though..

 

 

Found it.

You have the x axis set to Continuous.

If you change this to Categorical if fixes your problem without the need for a workaround.

 

If this fixes your problem please mark with a thumbs up and accept as the solution.

 

Thanks.

Anonymous
Not applicable

Hey, thank you for searching

I tried your solution and I found an error, there is 2 bar and 2 dates for the month of march. 

Could you explain where is the problem from ? 

Your date table holds the day, month and pic2.jpgyear.

 

You have an entry for March 10th and March 29th - hence the 2 entries show as you are using date in the axis.

If you want to display and summarise by Month Year, then create a measure to just bring back month and year from creationsdate and reference that measure in your chart aswell as in your measure "mesure"

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.