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.
Hello Team,
I want page-level filter that will auomate the selection month process which is the previous completed month.
for example, the current month is May 2020.
But I want page-level filter that can select April 2020 whenever the data udpates.
righ now I have manual selection of year and month.
Best regards
Aditya Vighne
Solved! Go to Solution.
I think you want to show values in Previous month.
You can build a unrelated calendar table , build a slicer by this calendar table and create a filter measure for your visual.
I build a sample table with values from 2020/01/01 to 2020/06/30.
Calendar Table:
Calendar =
ADDCOLUMNS(CALENDARAUTO(),"Year",YEAR([Date]),"Month",MONTH([Date]),"MonthName",FORMAT([Date],"MMMM"))
Measure:
Measure =
VAR _CurrentlastDay = MAX('Calendar'[Date])
VAR _PreviousStart = EOMONTH(_CurrentlastDay,-2)+1
VAR _PreviousEnd = EOMONTH(_CurrentlastDay,-1)
Return
IF(AND(MAX('Sample'[Date])>=_PreviousStart,MAX(Sample[Date])<=_PreviousEnd),1,0)
Add this measure into filter field in your visual and set this measure to show item when value =1.
Result is as below.
By default your visual will show blank.
Select 2020 May as current Month, visual will return values in previous month 2020 April.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
I think you want to show values in Previous month.
You can build a unrelated calendar table , build a slicer by this calendar table and create a filter measure for your visual.
I build a sample table with values from 2020/01/01 to 2020/06/30.
Calendar Table:
Calendar =
ADDCOLUMNS(CALENDARAUTO(),"Year",YEAR([Date]),"Month",MONTH([Date]),"MonthName",FORMAT([Date],"MMMM"))
Measure:
Measure =
VAR _CurrentlastDay = MAX('Calendar'[Date])
VAR _PreviousStart = EOMONTH(_CurrentlastDay,-2)+1
VAR _PreviousEnd = EOMONTH(_CurrentlastDay,-1)
Return
IF(AND(MAX('Sample'[Date])>=_PreviousStart,MAX(Sample[Date])<=_PreviousEnd),1,0)
Add this measure into filter field in your visual and set this measure to show item when value =1.
Result is as below.
By default your visual will show blank.
Select 2020 May as current Month, visual will return values in previous month 2020 April.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Syndicate_Admin , Create a new column in you date table and select Last Month and save
Month Type = Switch( True(),
eomonth([Date],0) = eomonth(Today(),-1),"Last Month" ,
eomonth([Date],0)= eomonth(Today(),0),"This Month" ,
Format([Date],"MMM-YYYY")
)
Or do this for both year and month
Year Type = Switch( True(),
eomonth([Date],0) = eomonth(Today(),-1),"Selected Year" ,
Format([Date],"YYYY")
)
Mon Type = Switch( True(),
eomonth([Date],0) = eomonth(Today(),-1),"Selected Month" ,
Format([Date],"mmmm")
)
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
96 | |
95 | |
80 | |
74 | |
66 |
User | Count |
---|---|
130 | |
106 | |
105 | |
86 | |
72 |