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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
dharani7
Helper I
Helper I

limiting the chart x axis like line chart or bar chart.

Dear Team

 

I have a line chart which consits of 365 days data , now i would like to limit only 12 days in power bi.

note:( even i have  slicer selection  for one month for eg jan1 2022 to feb 1st 2022 , 

the line chart has to be display only 12 days from the jan1st 2022)

can we limit the xaxis to only 12 

 

Regards,

Dharanidhar

3 REPLIES 3
amitchandak
Super User
Super User

@dharani7 , Use a measure like this in visual

 

new measure =
var _max = maxx(allselected(Date),Date[Date])
var _min = _max -12
return
calculate( sum(Table[Value]), filter('Date', 'Date'[Date] >=_min && 'Date'[Date] <=_max))

thanks amit but i am using url filtering  all the slicers are embeded from front end (angular) ,

does this work?

Hi @dharani7 ,

 

Dynamically limit 12 days, it doesn't seem to work. It is also recommended that you create visual-level filters in the report.

 

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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