Forum Discussion
Power Bi Slicer By Default Current Month
HI Team,
I am having Year and Month Slicer as shown below, when i am publishing this dashboard to server i am selecting current mont and publishing.
But for next month i need to select the current month and then has to republish .
Can you please help me every month the slicer can update with current month.
Please see the attachment i am giving the sample data how my slicer looks like.
See below i Published for october still its showing octber if current month changes slicer has to update.
|
|
|
- Anonymous2 years ago
Hi Jilani ,
Your demand is a good idea, while it is not supported to implement in Power BI currently.
You can vote up this idea for this function:Microsoft Idea
Or you can submit a new idea to improve the Power BI.
It is a place for customers provide feedback about Microsoft Office products . What’s more, if a feedback is high voted there by other customers, it will be promising that Microsoft Product Team will take it into consideration when designing the next version in the future.Here I will show you a workaround to achieve your goal. I think it is better for you to change the data type for columns in 'Date' table like [DateKey]/[Year]/[Month] to whole number,[Date] to date and so on.
Then add an unrelated table for slicer.
Date for Slicer = SUMMARIZE('Date','Date'[Year],'Date'[Month],"YearMonth",[Year]*100+[Month])Measure:
Filter = VAR _SELECTYEARMONTH = VALUES ( 'Date for Slicer'[YearMonth] ) RETURN IF ( ISFILTERED ( 'Date for Slicer'[Month] ), IF ( MAX ( 'Date'[Year] ) * 100 + MAX ( 'Date'[Month] ) IN _SELECTYEARMONTH, 1, 0 ), IF ( MAX ( 'Date'[Year] ) * 100 + MAX ( 'Date'[Month] ) = YEAR ( TODAY () ) * 100 + MONTH ( TODAY () ), 1, 0 ) )Add this measure into visual level filter and set it to show items when value = 1.
Best Regards,
Rico ZhouIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
2 Replies
- JilaniRegular Visitor
HI Team,
I am having Year and Month Slicer as shown below, when i am publishing this dashboard to server i am selecting current mont and publishing.
But for next month i need to select the current month and then has to republish .
Can you please help me every month the slicer can update with current month.
Please see the attachment i am giving the sample data how my slicer looks like.
See below i Published for october still its showing octber if current month changes slicer has to update.
https://drive.google.com/file/d/1-Hs786gJKP279IFV5ZBmCExZZ5xEC5UJ/view?usp=sharing
Sharing the sample Data Link As well
- AnonymousNot applicable
Hi Jilani ,
Your demand is a good idea, while it is not supported to implement in Power BI currently.
You can vote up this idea for this function:Microsoft Idea
Or you can submit a new idea to improve the Power BI.
It is a place for customers provide feedback about Microsoft Office products . What’s more, if a feedback is high voted there by other customers, it will be promising that Microsoft Product Team will take it into consideration when designing the next version in the future.Here I will show you a workaround to achieve your goal. I think it is better for you to change the data type for columns in 'Date' table like [DateKey]/[Year]/[Month] to whole number,[Date] to date and so on.
Then add an unrelated table for slicer.
Date for Slicer = SUMMARIZE('Date','Date'[Year],'Date'[Month],"YearMonth",[Year]*100+[Month])Measure:
Filter = VAR _SELECTYEARMONTH = VALUES ( 'Date for Slicer'[YearMonth] ) RETURN IF ( ISFILTERED ( 'Date for Slicer'[Month] ), IF ( MAX ( 'Date'[Year] ) * 100 + MAX ( 'Date'[Month] ) IN _SELECTYEARMONTH, 1, 0 ), IF ( MAX ( 'Date'[Year] ) * 100 + MAX ( 'Date'[Month] ) = YEAR ( TODAY () ) * 100 + MONTH ( TODAY () ), 1, 0 ) )Add this measure into visual level filter and set it to show items when value = 1.
Best Regards,
Rico ZhouIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.