The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I have a slicer showing month of year. I have not found a way to set the slicer to current month when the report opens, so I have to change that manually month by month. Small job, but it has to be done... So, another approach, if I create a bookmark for each month, can I then trigger the actual bookmark based on which month it is? I.e. by creating a measure holding current month? Or by any other value? Suggestions appreciated,
regards,
John Martin
Solved! Go to Solution.
Hi, @jmkvalsund
You can try the following to set the slicer to the current month.
Column:
Monthnum = MONTH([Date])
Measure:
Measure = IF(SELECTEDVALUE('Table'[Monthnum])=MONTH(TODAY()),1,0)
Place Measure in the slicer's view filter and set it to equal 1.
The slicer then displays only the current month's options. Is this the result you expect?
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @jmkvalsund
You can try the following to set the slicer to the current month.
Column:
Monthnum = MONTH([Date])
Measure:
Measure = IF(SELECTEDVALUE('Table'[Monthnum])=MONTH(TODAY()),1,0)
Place Measure in the slicer's view filter and set it to equal 1.
The slicer then displays only the current month's options. Is this the result you expect?
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Sorry folks, unforunately this will not help.
My slicer is a multiselect option-box. When current month is i.e. march, I want the three first boxes to be checked, since the report default should show accumulated results from january to march. I haven't found any other way to make the slicer come up with multiple options checked as default, than using bookmarks. And then the challenge is to select the actual bookmark (1 out of 12) when the report is being loaded.
Hi, having the same problem... did you found a way around? Thanks
HI @jmkvalsund
Please create serial for your month in DAX
Select the Month Name or Month No Col and go to Sort By option, and select SERIAL sort
In Drop Down slicer, select Sort by MONTHNAME
SO YOUR SLICER ALWAYS SHOWS, CURRENT MONTH FIRST. GO TO SLICER SETTING AND SELECT OPTION, SINGLE SELECT, SO YOUR CURRENT MONTH IS SELECTED BY DEFAULT.
If not solved, Please keep posted
If solve your requirement, please mark this answer as SOLUTION
If this comment helps you, please LIKE this comment/Kudos
Proud to be a Super User! | |
Hi @jmkvalsund , Please try this:
Step 1-> Transform data -> (in power query editor) click on Add column->Custom Column (Current Month)
put this DAX:
Date.MonthName( DateTime.LocalNow() )
Click on OK -> Apply & Close changes
Step 2:
In the report view, put the slicer and use current month(that we made in step 1) as date field.
Step 3: Select the slicer -> Go to Format pane-> Selection control -> turn ON the Single Select option
This will default your slicer to be at current month.
@jmkvalsund -> Please mark this as a solution & hit the thumbs up if it helps you. Thank you.
Regards,
TruptiS