Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Automatically Updating a Date Range to Reflect New Report Data

Hi Everyone,   I am building a report in power bi with data from salesforce reports. The power bi report gives our managers a one-week overview of sales performance. I am wondering how to set a dat...
  • v-kkf-msft's avatar
    v-kkf-msft
    5 years ago

    Hi Anonymous ,

     

    Try the following measures:

     

    Current Week = 
    var Start_date = TODAY() + -1 * WEEKDAY(TODAY(),2) + 1
    var End_date = TODAY() + -1 * WEEKDAY(TODAY(),2) + 5
    return "Business Report " & Start_date & "-" & End_date
    Last Week = 
    var Start_date = TODAY() + -1 * WEEKDAY(TODAY(),2) -6
    var End_date = TODAY() + -1 * WEEKDAY(TODAY(),2) - 2
    return "Business Report " & Start_date & "-" & End_date

     

    If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.

    Best Regards,
    Winniz

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.