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

Default setting by opening report

Hi,

 

We have a report with a few slicers (3) that can be changed.

One of the slicers is a date slicer to choose between the months. Now when you save and publish it to the service, by opening you always see the options when you saved it.

Can we change it that users always see the last month for example? So it change throught the year?

 

kind regards,

Davina

1 ACCEPTED SOLUTION
Kumail
Post Prodigy
Post Prodigy

Hello @Anonymous 

 

You can do something like this

 

Default Month Slicer =
IF (
MONTH ( NOW () ) = MONTH ( Dates[Date] )
&& YEAR ( NOW () ) = YEAR ( Dates[Date] ),
"Current Month",
Dates[Year-Month]
)

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly and I would love to see your like Or

 

If you could send sample .pbix that demonstrate what you are looking to get. It would really help providing you a quick implemented solution.

 

Regards

Kumail Raza

View solution in original post

9 REPLIES 9
Anonymous
Not applicable

@KumailThanks, it works today.

Now i see the current month for june, but is it also possible to see both "current month" and "june"?

@Anonymous 

 

Please consider Accept it as the solution to help the other members find it more quickly and consider like if it helped you!!

 

Regards

Kumail Raza

Anonymous
Not applicable

@Kumailit works but I had another question in my previous reply.

If you can answer this one, I can accept this.

 

Question: Now i see the current month for june, but is it also possible to see both "current month" and "june"?

@Anonymous 

 

If you could send sample .pbix that demonstrate what you are looking to get. It would really help providing you a quick solution.

 

Regards
Kumail Raza

@Anonymous 

 

Default Current/Recent Month Slicer = 
IF (
MONTH ( NOW () ) = MONTH ( 'Table'[Date] )
&& YEAR ( NOW () ) = YEAR ( 'Table'[Date] ),
"Current Month "& FORMAT(NOW(),"mmmm-yyyy"),
FORMAT(MAX( 'Table'[Date] ),"mmmm-yyyy")
)

 

This will add "Current Month" along side name of the month if the condition fulfils for current month. 

 

If you could send sample .pbix that demonstrate what you are looking to get. It would really help providing you a quick solution.

 

Hope the above solution helps. 

 

Regards

Kumail Raza

Anonymous
Not applicable

@StefanoGrimaldi& @Kumail Thanks for your feedback, but this is a filter. I'm using slicers, so if I add this to the slicer or at any other visual it will always show last month. Meaning of our reports is opening in default value of last month, but also the possibility to change to an other month.

@Anonymous 

 

Yes, this will give you current month and you can keep it as default slicer when publishing. The user will also have option to change slicer to other months if that is allowed in the published report.

 

If you could send sample .pbix that demonstrate what you are looking to get. It would really help providing you a quick solution.

 

Hope this helps. 

 

Regards

Kumail Raza

Kumail
Post Prodigy
Post Prodigy

Hello @Anonymous 

 

You can do something like this

 

Default Month Slicer =
IF (
MONTH ( NOW () ) = MONTH ( Dates[Date] )
&& YEAR ( NOW () ) = YEAR ( Dates[Date] ),
"Current Month",
Dates[Year-Month]
)

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly and I would love to see your like Or

 

If you could send sample .pbix that demonstrate what you are looking to get. It would really help providing you a quick implemented solution.

 

Regards

Kumail Raza

StefanoGrimaldi
Resident Rockstar
Resident Rockstar

hey, 

theres a option when you put a field on the filter pane (if its a date field) thats called relative filter (appears in a dropdown on the field filter on the filter pane), there you do have the option to filter by month you select the one called last X month and specify 1 month. 

StefanoGrimaldi_0-1624970025104.png

 

now for making it work for the last month them you will need to make a little dax that get the current month first day -1 and use that field for the relative filter if. 





Did I answer your question? Mark my post as a solution! / Did it help? Give some Kudos!

Proud to be a Super User!




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.