The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello all,
I'm trying to collect whatever the value is from last week within a custom column. Below is an example of what it would look like
Solved! Go to Solution.
Remember that you have to calculate this from the point of view of the visual element if you do this as a measure.
So instead of
VAR most_recent_date = LASTDATE('data'[date]) -7
you would say
VAR most_recent_date =DATEADD('data'[date]), -7,DAY)
Note that "the value from last week" is not the same as "the value from the day seven days before the current day"
Hello @Anonymous
Please see if the following query.
Remember that you have to calculate this from the point of view of the visual element if you do this as a measure.
So instead of
VAR most_recent_date = LASTDATE('data'[date]) -7
you would say
VAR most_recent_date =DATEADD('data'[date]), -7,DAY)
Note that "the value from last week" is not the same as "the value from the day seven days before the current day"
User | Count |
---|---|
13 | |
8 | |
6 | |
6 | |
5 |
User | Count |
---|---|
24 | |
14 | |
13 | |
8 | |
8 |