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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
benjos23
Frequent Visitor

Select last date by default on slicer and line chart

Hi !

My request has already been partially answered in other subjects, such as this one, but I need something a bit more specific. It may be too specific for PowerBI, but I give it a try !

In my dashboard, I have a main slicer to choose the year to analyze. As I want to analyze data yearly (even monthly, but this is another story), the slicer is set to act like a radio button (simple selection). Currently, its default value is set to "2024", which is the last available and current year for analysis :

benjos23_0-1723096677746.png

I know I could create a new column in my Date table that either returns e.g. "Actual year" for the last available year, either the year itself for other years. My first question would be:
1. Is it really impossible to replace the value "Actual year" with the year itself (e.g. 2024), but keeping the same logic under the hood ?

For month selection, I would like to avoid using a slicer, as I have a huge line chart that allows user to select the month of its choice (in the image below, the month of June is selected) :

benjos23_1-1723097073350.png

Now comes my second (too) specific question:
2. Would it be possible to select the last available month by default (i.e. when the report is opened), in the line chart visualization ?

I would really appreciate your help.

Thank you for reading.

Benjamin

11 REPLIES 11
Idrissshatila
Super User
Super User

Hello @benjos23 ,

 

yes its possible, you can find the answer for booth question in the video
https://youtu.be/JlVHsZUk1nc?si=6R_eufcPiweMQolR

 



Did I answer your question? Mark my post as a solution! Appreciate your Kudos
Follow me on LinkedIn linkedIn
Vote for my Community Mobile App Idea

Proud to be a Super User!




Hi @Idrissshatila, thank you for your answer.

Actually, the video you provided doesn't answer to any of my questions, maybe I was not clear enough in my explanations:
1. I would have liked the "default" year to be shown as the actual year value in the slicer, and not in a separated card.

2. I do not want a slicer for selecting the month, I would have liked that the default month is automatically selected in the line chart, when the report is open, as shown in this image:
benjos23_1-1723097073350.png
Thanks anyway for you help.

@benjos23 ,

 

you can add this new calculated column in the axis chart instead of the filter visual, as in the video the created column that has actual can be added to the line chart as well.



Did I answer your question? Mark my post as a solution! Appreciate your Kudos
Follow me on LinkedIn linkedIn
Vote for my Community Mobile App Idea

Proud to be a Super User!




@Idrissshatila 
Oh yeah, of course ! It works perfectly thank you !
But still for my first question, is there a way to replace the default text (for me it is "actuel") with the real month/year name. I.e. : 

benjos23_0-1723109313898.png

I would like the "actuel" text to be replaced by "juillet" (which means july)

@benjos23 ,

 

if you want to have the month here instead of actual, then use the main month column that has the month name.



Did I answer your question? Mark my post as a solution! Appreciate your Kudos
Follow me on LinkedIn linkedIn
Vote for my Community Mobile App Idea

Proud to be a Super User!




@Idrissshatila 
Yeah but in that case, I will loose the wanted behavior, which allows to update selection of the default month in the line chart...

yeah you can either have this or that, it won't work with both



Did I answer your question? Mark my post as a solution! Appreciate your Kudos
Follow me on LinkedIn linkedIn
Vote for my Community Mobile App Idea

Proud to be a Super User!




Hi again @Idrissshatila,
I think I spoke too quickly... the actual month remains selected when the data is updated on Power BI Desktop. However, when publishing my report on Power BI Service, and then opening the report, the actual month is not selected in the line chart. Yet it was the behaviour I was aiming for. I tried many things:
- Publishing the report with the actual month selected in the line chart
- Creating a bookmark with the actual month selected, selecting this bookmark and publish the report
With both settings, the actual month is not selected by default when I open the report in Power BI Service... Do you know how I can resolve that ?

Hello @benjos23 ,

 

did you try to reset the filters in Power bi service ?

 



Did I answer your question? Mark my post as a solution! Appreciate your Kudos
Follow me on LinkedIn linkedIn
Vote for my Community Mobile App Idea

Proud to be a Super User!




@Idrissshatila 
Actually, I can't reset the filters when I first access the new created report, as the view is considered as "the default view of the report's author".
Strangely, the bookmark I created that I want to be my default bookmark is not selected when I first access the report, yet I have select it before publishing my report.
I am really confused here, all my other slicers are set correctly, but my line chart simply cannot be shown as I want to be shown...
Here is the view of the report when I publish it :
(The text "June 2024" is updated according to the selected month)

benjos23_0-1723186264415.png

benjos23_1-1723186315070.png


And here is the view when I access the report for the first time on Power BI Service:
(The text now shows "Year 2024", as no month is selected...)

benjos23_2-1723186386475.pngbenjos23_3-1723186408081.png

 

I guess there is no solution then ?

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

AugPowerBI_Carousel

Power BI Monthly Update - August 2024

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

August Carousel

Fabric Community Update - August 2024

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