Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi ,
I using two slicer, one for year and another one for month, if i select 2021 year, the month slicer only have to show upto october month, because 2021 November and december values(Sales) not added. Kindly advice how to create a slicer while select 2021 year and month upto october.
Solved! Go to Solution.
Hi @NavaneethaRaju ,
You can create a measure like this, put it in the month visual filter and set its value as 1:
A =
IF (
SELECTEDVALUE ( 'Table'[Date].[Year] ) = YEAR ( TODAY () ),
IF ( MAX ( 'Table'[Date].[MonthNo] ) <= MONTH ( TODAY () ), 1, 0 ),
1
)
Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @NavaneethaRaju ,
You can create a measure like this, put it in the month visual filter and set its value as 1:
A =
IF (
SELECTEDVALUE ( 'Table'[Date].[Year] ) = YEAR ( TODAY () ),
IF ( MAX ( 'Table'[Date].[MonthNo] ) <= MONTH ( TODAY () ), 1, 0 ),
1
)
Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @v-yingjl ,
I'm getting error, using now.
And one thing in your measure You used the column [monthNo], that is not in your table. please check and advice.
Your Measure.
Your table.
Create the following Measure :
This gives only those months have sales in your Sales Table.
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Create a measure with this code:
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
User | Count |
---|---|
25 | |
12 | |
8 | |
7 | |
7 |
User | Count |
---|---|
25 | |
12 | |
11 | |
10 | |
6 |