Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
How to get only last Friday closing rate of a stock dynamically in power bi dax
Thanx for your solution , It works fine, but I have a date slicer in my report page which do not effect my last friday closing rate, In other words I always get last friday closing rate irrespective of date selection
@MAP
Explain your requirements a bit more clarly and provide mode details on how your data model is organized.
Better, you could attach a sample PBIX file using a OneDrive or GoogleDrive.
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
@MAP
Try:
Last Friday Rate =
VAR __LastFriday = MAXX( FILTER( VALUES( Stocks[Date] ) , WEEKDAY( Stocks[Date] ,1 ) = 6 ) , Stocks[Date] )
VAR __Result = CALCULATE( MAX(Stocks[Closing Rate]) , Stocks[Date] = __LastFriday )
RETURN
__Result
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
Thanx for your solution. It works fine but I have a date slicer on my report page ,whatever date I will select from the date slicer your solution won't take changes according to selected date ,in other words slicer don't effect this measure and give me last friday closing rate dynamically. You got it my point.....!
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
22 | |
7 | |
6 | |
6 | |
6 |
User | Count |
---|---|
27 | |
12 | |
10 | |
9 | |
6 |