The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
I have a date slicer, and the slicer type is set to "before" to show only the end date.
I have a table visual where I have added dates in columns.
Now if I select 6 june 2025 in slicer, I want the table to show dates from 1 june to 6 june 2025.
Similarly, if I select 4 may 2025 in slicer, I want the table to show dates from 1 may to 4 may 2025.
How do I do this?
Solved! Go to Solution.
Hi @Vivdroid_C_4222,
Thank you for the update. Could you please share the sample data related to your thread? This would help me reproduce the scenario and work towards a solution. Please provide the sample data in table format, along with the expected outcome based on your thread.
Thank you.
Hi @Vivdroid_C_4222,
Thank you for reaching out to the Microsoft fabric community forum. Also thanks @Nasif_Azam, @RicoZhou, @Bibiano_Geraldo, for sharing valuable insights.
After thoroughly reviewing the details you provided, I reproduced the scenario, and it worked on my end. I used it as sample data and successfully implemented it.
Relationship:
If slicer is Before: 6 June 2025, then the table visual will show:
outcome:
I am also including .pbix file for your better understanding, please have a look into it:
If this post helps, then please give us ‘Kudos’ and consider Accept it as a solution to help the other members find it more quickly.
Thank you for using Microsoft Community Forum.
Hi @v-kpoloju-msft ,
I don't think calculated column could return dynamic result based on slicer. There is only data in June in your sample data table. And @Vivdroid_C_4222 use before style in slicer. If you add data before, it doesn't work.
I believe that being a Microsoft Technical Support Engineer requires specialized skills, careful understanding of customer issues, and a sense of responsibility.
Best Regards,
Rico Zhou
Hi @Vivdroid_C_4222,
Apologize for the inconvenience caused. After thoroughly reviewing the details you provided, As mentioned by the @RicoZhou. I again reproduced the scenario, and it worked on my end. I used it as sample data and successfully implemented it.
Relationship:
outcome:
I am also including .pbix file for your better understanding, please have a look into it:
If this post helps, then please give us ‘Kudos’ and consider Accept it as a solution to help the other members find it more quickly.
Thank you for using Microsoft Community Forum.
Hi @Vivdroid_C_4222,
May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.
Thank you.
Hi @Vivdroid_C_4222,
I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If my response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.
Thank you.
Hi @Vivdroid_C_4222,
I hope this information is helpful. Please let me know if you have any further questions or if you'd like to discuss this further. If this answers your question, please Accept it as a solution and give it a 'Kudos' so others can find it easily.
Thank you.
Unfortunately, none of the solutions have helped so far..
Hi @Vivdroid_C_4222,
Thank you for the update. Could you please share the sample data related to your thread? This would help me reproduce the scenario and work towards a solution. Please provide the sample data in table format, along with the expected outcome based on your thread.
Thank you.
Hi @Vivdroid_C_4222,
We haven’t received a response with the requested sample data to help troubleshoot your issue effectively.
To proceed further, please share a minimal and clean sample dataset (not a screenshot) along with the expected output. This helps the community understand and resolve your question faster.
Thank you.
Hi @Vivdroid_C_4222,
Following up again as we still haven't received the required sample data or clarification to assist with your issue. Please provide sample data based on the thread details which might resolve your issue quickly.
Thank you.
Hi @Vivdroid_C_4222,
This is a final reminder that your post lacks the necessary details (sample data or expected result) needed for the community to assist you. Please provide sample data based on the thread details which might be resolve your issue quickly.
Thank you.
Hey @Vivdroid_C_4222 ,
You can achieve Month-To-Date (MTD) filtering in your Power BI table visual with a "Before" date slicer by creating a calculated column or a DAX measure that dynamically determines whether a date falls within the MTD range.
1. Create a new column for Day and Month
Make sure you have a proper Date table marked as a date table. If not, create one like this:
DateTable = CALENDAR(DATE(2020, 1, 1), DATE(2030, 12, 31))
Then add the necessary columns:
Year = YEAR(DateTable[Date]) Month = MONTH(DateTable[Date]) Day = DAY(DateTable[Date])
2. Create a disconnected Date slicer
You already have a slicer set to "Before". Make sure it's using a separate date table like SlicerDateTable[Date].
3. Create a Measure to Flag MTD Dates
Now create a measure that flags rows as TRUE if the date is in the same month and year as the selected date and is less than or equal to the selected date:
IsMTDDate = VAR SelectedDate = MAX('SlicerDateTable'[Date]) RETURN IF( 'DateTable'[Date] <= SelectedDate && MONTH('DateTable'[Date]) = MONTH(SelectedDate) && YEAR('DateTable'[Date]) = YEAR(SelectedDate), 1, 0 )
4. Apply Visual Filter
Go to your table visual and drag DateTable[Date] into it. Then:
Drag the IsMTDDate measure to the filter pane of the visual.
Set the filter to IsMTDDate = 1.
Works Like
When you select June 6, 2025, the logic includes all dates from June 1 to June 6, 2025.
When you select May 4, 2025, it includes May 1 to May 4, 2025.
If you found this solution helpful, please consider accepting it and giving it a kudos (Like) it’s greatly appreciated and helps others find the solution more easily.
Best Regards,
Nasif Azam
Hi @Vivdroid_C_4222,
No need an unrelated date table. You can try to add a measure filter to filter your table visual.
My Sample Table:
Relationship:
Measure:
Measure Filter =
VAR _MONTHSTART = EOMONTH(MAX(DimDate[Date]),-1)+1
RETURN
IF(MAX('Table'[Date]) >= _MONTHSTART,1,0)
Add this measure into visual level filter and set it to show items when value = 1.
Best Regards,
Rico Zhou
Hi @Vivdroid_C_4222 ,
Your need to add disconnected dateTable to reach your goal, if you could share no sensitive file to help you, it will be very helpful to give you, the more accurated answer.