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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

Reply
sreddy47652
Helper III
Helper III

how to show in power bi desktop last refresh date as weekdays

Hi Team, I need some help on dax to display last refresh date as Previous day, for example if you open the report on Monday then it should displat last refresh date as Friday(Excluding Weekends) and same way i want to display data as last friday. So can anyone help me how to accheive on this.

1. I need to display tile as last refresh date as previous day.

2.I need display data on kpi or card for previous day based on refresh.

I have writen the below formula but both are returning as Last refresh date but it's not excluding weekend. when i open the report in Monday i should see Fridays refresh date .

Revenue Refresh =

 

var a = CALCULATE(MAX('WWR Details'[Fiscal Date]), 'WWR Details'[Actual Indicator] = "Actual", REMOVEFILTERS('Business HM Hrchy'), REMOVEFILTERS('Rpt Loc HM Hrchy'))

 

var b = CALCULATE(MAX('WWR Details'[Fiscal Date]), 'WWR Details'[Actual Indicator] = "Actual", REMOVEFILTERS('Quarter Selector'[Fiscal Quarter Alias]), REMOVEFILTERS('Business HM Hrchy'), REMOVEFILTERS('Rpt Loc HM Hrchy'))

var c = CALCULATE(MAX('Fiscal Calendar'[Date]), 'Fiscal Calendar'[Date] = a, REMOVEFILTERS('Quarter Selector'[Fiscal Quarter Alias]), REMOVEFILTERS('Business HM Hrchy'), REMOVEFILTERS('Rpt Loc HM Hrchy'))



var d = CALCULATE(MAX('Fiscal Calendar'[Date]), 'Fiscal Calendar'[Date] = b, REMOVEFILTERS( 'Quarter Selector'[Fiscal Quarter Alias]), REMOVEFILTERS('Business HM Hrchy'), REMOVEFILTERS('Rpt Loc HM Hrchy'))

 

//return upper(FORMAT(a, "dd-MMM-YYYY"))

var e = IF(ISBLANK(a), upper(FORMAT(d, "dd-MMM-YYYY")), upper(FORMAT(c, "dd-MMM-YYYY")))

 

return "As of : " & a

 

sreddy47652_0-1687801679767.jpeg

 

 

1 REPLY 1
VijayP
Super User
Super User

@sreddy47652 

https://community.fabric.microsoft.com/t5/Service/Last-Date-Refresh-Card/m-p/2966697

try using this and let me know if still you are not aheiving what you require!




Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
MY Blog || My YouTube Channel || Connect with me on Linkedin || My Latest Data Story - Ageing Analysis

Proud to be a Super User!


Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

Feb2025 NL Carousel

Fabric Community Update - February 2025

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

Top Solution Authors
Top Kudoed Authors