cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Delphia
Helper III
Helper III

Clustered column chart date limits (dynamic)

Hello everyone,

I need your help with a Clustered column and line chart.

bikes.jpg

 

The goal is to show the chart with the x-axis, where the last date = the date, where "sold" and/or "cost" data is available.

In this case, there should be 3 values: July, August, September. 

The limits of x-axis should be changed dynamically, depending on the applied filters.

 

I use calenderauto() for my date table.

 

Thank you for your ideas!

1 ACCEPTED SOLUTION
selimovd
Super User
Super User

Hey @Delphia ,

 

the axis will disappear when there is not data to show. So I would recommend to check in the [Profit %] measure if there is data in the other two measures:

Profit % =
IF([Sold] = BLANK() && [Cost] = BLANK(), BLANK(), [the current Profit % code] ) 

 

If you need any help please let me know.
If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
 
Best regards
Denis
 

View solution in original post

2 REPLIES 2
selimovd
Super User
Super User

Hey @Delphia ,

 

the axis will disappear when there is not data to show. So I would recommend to check in the [Profit %] measure if there is data in the other two measures:

Profit % =
IF([Sold] = BLANK() && [Cost] = BLANK(), BLANK(), [the current Profit % code] ) 

 

If you need any help please let me know.
If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
 
Best regards
Denis
 

View solution in original post

Thank you, Denis, for this solution! It works perfectly!

Helpful resources

Announcements
Power BI December 2021 Update_carousel 768x460.jpg

Check it Out!

Click here to read more about the December 2021 Updates!

User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Jan 2022 Dev Camp 768x460 copy.png

Power BI Dev Camp- January 27th, 2022

Mark your calendars and join us for our next Power BI Dev Camp!

Top Solution Authors
Top Kudoed Authors