Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi,
I have this calculated table, it has rows with values, colums with date of creation truncated to weeks and a check in value.
I need another colum with the value of the last week (creation week - 7 days) and check in date last year.
I´ve tryed several solution with out acurrate result, what will be the best aproach?
Thanks!
Solved! Go to Solution.
Try :
New Column = sumx(filter(Table,[Creation] = (earlier([creation]) - 7) && [Check in] = (earlier([check in]) - 365)),[room nights])
Hi
Thanks frist of all!
New Colum = sum(room nights) where Creation = creation - 7 and Check in = check in - 365
In SQL it´s easy 🙂
Cheers
Not 100% on what you are asking with that last one. Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
If you want the value of the last week you can do this:
Column =
VAR __Current = [CheckIn]
VAR __CurrentMinus7Days = (__CurrentWeek - 7) * 1.
RETURN
MAXX(FILTER('Table',[Checkin] = __CurrentMinus7Days),[RoomNights])
Thanks for your help, but this does not work.
I just wanted to put the same value of last year creation and last year check in, trys to use your solution with out luck:
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 38 | |
| 36 | |
| 33 | |
| 32 | |
| 29 |
| User | Count |
|---|---|
| 129 | |
| 88 | |
| 79 | |
| 68 | |
| 63 |