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

Try your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join now

Reply
unde2667
New Member

Getting PowerBI to show current excel function that uses today() expression

My PowerBI pulls from about 8 excel files. One of the things it returns is the name of someone assigned to a certain date range. This comes from an excel sheet where names are assigned to weeks and I use the today() expression within lookup to display the name assigned to that week. While PowerBI refreshes, it is still pulling the old name based on the last time the excel sheet was saved. If I open the excel sheet and save it, PowerBi then pulls the right name. Is there a way I can get PowerBI to update the excel sheet automatically? Do I need to use PowerAutomate to open/save/close the sheet daily?

unde2667_0-1641665454629.png

 

1 ACCEPTED SOLUTION
bcdobbs
Community Champion
Community Champion

I'd probably do something like:

Current Primary = 
    CALCULATE (
        SELECTEDVALUE( Assignment[Primary Individual] ),
        Assignment[Date Start] <= TODAY(),
        Assignment[Date End] >= TODAY()
    )


Ben Dobbs

LinkedIn | Twitter | Blog

Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!

View solution in original post

6 REPLIES 6
unde2667
New Member

Thats it! Thanks @bcdobbs !!

bcdobbs
Community Champion
Community Champion

I'm sure you could use power automate

to recalculate a sheet.

 

If I were you though I'd pull the raw data table in and write a measure to reproduce the logic inside power bi.



Ben Dobbs

LinkedIn | Twitter | Blog

Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!

That makes sense to just have it look it up within PowerBI... Thanks! I'm not great with DAX, can you help with the equation? in Excel it's 
=LOOKUP(2,1/($A$29:$A$34<=TODAY())/($B$29:$B$34>=TODAY()),$C$29:$C$34)

Within PowerBI, would it be a "lookupvalue" function?

Hi,

Share some data, describe the question and show the expected result.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
bcdobbs
Community Champion
Community Champion

I'd probably do something like:

Current Primary = 
    CALCULATE (
        SELECTEDVALUE( Assignment[Primary Individual] ),
        Assignment[Date Start] <= TODAY(),
        Assignment[Date End] >= TODAY()
    )


Ben Dobbs

LinkedIn | Twitter | Blog

Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!
bcdobbs
Community Champion
Community Champion

That creates a measure which would display todays primary. If that's all you need then just drop it in a card visual.

 

If you have more complicate needs downstream of that then give some details.



Ben Dobbs

LinkedIn | Twitter | Blog

Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!

Helpful resources

Announcements
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.