Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Hello Community!
I'm trying to make some button filters to filter the date from a table.
Ultimo Semestre(Last Semester: filter the last 6 months) and
Ultimo Ano(Last Year: filter the last 12 months).
These buttons are on the left side of the dashboard.
I wrote a measure to both buttons filter and I was just trying random dates and it isn't working.
The measure gets the Dates from 'meta12022[Data]'.
What I did wrong here?
Solved! Go to Solution.
@angelosales150 , You need have two measures two be switch based on independent table slicer having that value
//Date1 is independent Date table
6 Month =
var _max =if(isfiltered('Date'), maxx(allselected(Date),Date[Date]), today())
var _min = eomonth(_min, -6)
return
calculate( sum(Table[Value]), filter('Table', 'Table'[Date] >=_min && 'Table'[Date] <=_max))
//Date1 is independent Date table
12 Month =
var _max =if(isfiltered('Date'), maxx(allselected(Date),Date[Date]), today())
var _min = eomonth(_min, -12)
return
calculate( sum(Table[Value]), filter('Table', 'Table'[Date] >=_min && 'Table'[Date] <=_max))
Slicer need to created like this
https://medium.com/chandakamit/power-bi-when-i-felt-lazy-and-i-needed-too-many-measures-ed8de20d9f79
@angelosales150 , You need have two measures two be switch based on independent table slicer having that value
//Date1 is independent Date table
6 Month =
var _max =if(isfiltered('Date'), maxx(allselected(Date),Date[Date]), today())
var _min = eomonth(_min, -6)
return
calculate( sum(Table[Value]), filter('Table', 'Table'[Date] >=_min && 'Table'[Date] <=_max))
//Date1 is independent Date table
12 Month =
var _max =if(isfiltered('Date'), maxx(allselected(Date),Date[Date]), today())
var _min = eomonth(_min, -12)
return
calculate( sum(Table[Value]), filter('Table', 'Table'[Date] >=_min && 'Table'[Date] <=_max))
Slicer need to created like this
https://medium.com/chandakamit/power-bi-when-i-felt-lazy-and-i-needed-too-many-measures-ed8de20d9f79
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the June 2024 Power BI update to learn about new features.
User | Count |
---|---|
93 | |
87 | |
80 | |
69 | |
68 |
User | Count |
---|---|
226 | |
129 | |
119 | |
83 | |
77 |