The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi everyone,
I want to do something like this "If I select enddate in date calendar then it will return the last days of each month except the selected month which will return the selected date".Please help me with this!
The selected date is 6/6/2025
Image 1 is the current result
and image 2 is the result I want to get!
Thank you everyone!
Solved! Go to Solution.
hello @GOLEM
when you choose a selected month, you will only see values from the selected month while the other months will be filtered out.
Do you want to get the EndOfMonth when you have chosen month value or when all value are presented (from your screenshot, it looks like all data are presented).
Meanwhile, let see if this accomodate your need.
EndofMonth =
IF(
EOMONTH(SELECTEDVALUE('Table'[Date]),0)=EOMONTH(TODAY(),0),
SELECTEDVALUE('Table'[Date]),
EOMONTH(SELECTEDVALUE('Table'[Date]),0)
)
Thank you.
Hi @GOLEM
If you want to show the end of month relative to the slicer selection but still show all rows other than the dat selected then you will need to use a disconnected table as using a column from the same or related table in a slicer will show only the rows within the selection
End of Month Date =
// Get the selected date from the disconnected date table
VAR _SelectedDate =
SELECTEDVALUE ( DisconnectedDate[Date] )
// Get the end of the month for the selected date from the slicer
VAR _EndOfSelectedMonth =
EOMONTH ( _SelectedDate, 0 )
// Get the end of the month for the current row context from the Dates table
VAR _EndOfMonthCurrentRow =
EOMONTH ( SELECTEDVALUE ( Dates[Date] ), 0 )
// If the current row is in the same month as the selected slicer date,
// return the actual date; otherwise, return the end of the current row's month
VAR _Result =
IF (
_EndOfSelectedMonth = _EndOfMonthCurrentRow,
SELECTEDVALUE ( Dates[Date] ),
_EndOfMonthCurrentRow
)
RETURN
_Result
Pease see the attached pbix for your reference.
Hi @GOLEM,
Thanks for reaching out to the Microsoft fabric community forum.
It looks like you want to select the last date of each month(except the selected month) and its relevant data from your table. As @danextian and @Irwan both responded to your query, please go through their responses and check if your issue can be resolved.
I would also take a moment to thank @danextian and @Irwan, for actively participating in the community forum and for the solutions you’ve been sharing in the community forum. Your contributions make a real difference.
If I misunderstand your needs or you still have problems on it, please feel free to let us know.
Best Regards,
Hammad.
Community Support Team
If this post helps then please mark it as a solution, so that other members find it more quickly.
Thank you.
Hi @GOLEM,
As we haven’t heard back from you, so just following up to our previous message. I'd like to confirm if you've successfully resolved this issue or if you need further help.
If yes, you are welcome to share your workaround and mark it as a solution so that other users can benefit as well. If you find a reply particularly helpful to you, you can also mark it as a solution.
If so, it would be really helpful for the community if you could mark the answer that helped you the most. If you're still looking for guidance, feel free to give us an update, we’re here for you!
Hi @GOLEM,
I just wanted to follow up on your thread. If the issue is resolved, it would be great if you could mark the solution so other community members facing similar issues can benefit too.
If not, don’t hesitate to reach out, we’re happy to keep working with you on this.
Best Regards,
Hammad.
Hi @GOLEM,
I wanted to quickly follow up on your issue. Was your issue resolved in the end?
If yes, it’d be great if you could share a quick update and accept a solution, so other users can benefit from your experience too.
If you’re still stuck, let us know, we’re more than happy to continue helping you through it.
Best Regards,
Hammad.
Hi @GOLEM
If you want to show the end of month relative to the slicer selection but still show all rows other than the dat selected then you will need to use a disconnected table as using a column from the same or related table in a slicer will show only the rows within the selection
End of Month Date =
// Get the selected date from the disconnected date table
VAR _SelectedDate =
SELECTEDVALUE ( DisconnectedDate[Date] )
// Get the end of the month for the selected date from the slicer
VAR _EndOfSelectedMonth =
EOMONTH ( _SelectedDate, 0 )
// Get the end of the month for the current row context from the Dates table
VAR _EndOfMonthCurrentRow =
EOMONTH ( SELECTEDVALUE ( Dates[Date] ), 0 )
// If the current row is in the same month as the selected slicer date,
// return the actual date; otherwise, return the end of the current row's month
VAR _Result =
IF (
_EndOfSelectedMonth = _EndOfMonthCurrentRow,
SELECTEDVALUE ( Dates[Date] ),
_EndOfMonthCurrentRow
)
RETURN
_Result
Pease see the attached pbix for your reference.
hello @GOLEM
when you choose a selected month, you will only see values from the selected month while the other months will be filtered out.
Do you want to get the EndOfMonth when you have chosen month value or when all value are presented (from your screenshot, it looks like all data are presented).
Meanwhile, let see if this accomodate your need.
EndofMonth =
IF(
EOMONTH(SELECTEDVALUE('Table'[Date]),0)=EOMONTH(TODAY(),0),
SELECTEDVALUE('Table'[Date]),
EOMONTH(SELECTEDVALUE('Table'[Date]),0)
)
Thank you.
User | Count |
---|---|
81 | |
74 | |
42 | |
30 | |
28 |
User | Count |
---|---|
108 | |
96 | |
53 | |
48 | |
47 |