Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Niiru1
Helper V
Helper V

Calculate End of week within customised string

I have a customised string that I want to include the end of the week date (Saturday) from a column I have [Event Date of first case]

 

e.g. measure

Title Table 1. = "Table 1: Contains all of my sample data " &
MAXX(ALL('Outbreaks and Events'),'Outbreaks and Events'[Event Date of first case]) &
" = "
& [Outbreak Identifier Count] //& MOD('Outbreaks and Events'[Event Date of first case])


 

In this case I have used MAXX(ALL('Outbreaks and Events'),'Outbreaks and Events'[Event Date of first case] to find the max of [Event Date of first case] but this goes too far and I need to just find the END OF THE WEEK (Saturday) for this column

 

Can this be done?

 

Thanks in advance

 

 

Maybe something like FORMAT(MOD)????

1 ACCEPTED SOLUTION
mahoneypat
Employee
Employee

If this is for a calculated column, this expression can be adapted to get the end of the week (Saturday) date on each row.  You can concatenate it into your expression.

 

EOW Saturday = 'Date'[Date] + 7 - WEEKDAY('Date'[Date])
 
Regards,
Pat




Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


View solution in original post

2 REPLIES 2
mahoneypat
Employee
Employee

If this is for a calculated column, this expression can be adapted to get the end of the week (Saturday) date on each row.  You can concatenate it into your expression.

 

EOW Saturday = 'Date'[Date] + 7 - WEEKDAY('Date'[Date])
 
Regards,
Pat




Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


Fowmy
Super User
Super User

@Niiru1 

Can you share some sample data and the expected result to have a clear understanding of your question?
You can save your files in OneDrive, Google Drive, or any other cloud sharing platforms and share the link here.
____________________________________
How to paste sample data with your question?
How to get your questions answered quickly?

_____________________________________
Did I answer your question? Mark this post as a solution, this will help others!.

Click on the Thumbs-Up icon if you like this reply 🙂

YouTube, LinkedIn

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.