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,
I am having some trouble.
I need a button that if you click on it, it will filter everything by the current month.
Does anyone know how todo this.
Also if there is a way todo this for current day and week that would be super helpful.
Thank you.
Solved! Go to Solution.
This can be achieved using a DAX formula and creating a calculated column, or using a measure and creating a button that selects the current month when clicked. Here is an example of a DAX formula for a calculated column that returns the current month:
=IF(MONTH(TODAY())=MONTH([Date]),1,0)
In this formula, the TODAY() function returns the current date, and the MONTH function returns the current month number. The IF function checks if the current month number is equal to the month number of the date in the [Date] column, and returns 1 if it is, and 0 otherwise.
Once you have created the calculated column, you can use it to create a slicer that filters the report to only show the current month. You can also create a button that toggles the selection in the slicer, so that when it is clicked, it selects the current month.
This can be achieved using a DAX formula and creating a calculated column, or using a measure and creating a button that selects the current month when clicked. Here is an example of a DAX formula for a calculated column that returns the current month:
=IF(MONTH(TODAY())=MONTH([Date]),1,0)
In this formula, the TODAY() function returns the current date, and the MONTH function returns the current month number. The IF function checks if the current month number is equal to the month number of the date in the [Date] column, and returns 1 if it is, and 0 otherwise.
Once you have created the calculated column, you can use it to create a slicer that filters the report to only show the current month. You can also create a button that toggles the selection in the slicer, so that when it is clicked, it selects the current month.
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
User | Count |
---|---|
88 | |
85 | |
68 | |
66 | |
64 |
User | Count |
---|---|
208 | |
120 | |
113 | |
79 | |
72 |