This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowThe Fabric community is upgrading! Read all of the details including the timeline and what you can expect. Learn more
Hello,
I have 1 table with details of the sessions each days (2015-->2020) Named Freq-web-all
I have a calendar calculated field Named Calendrier
I linked these 2 tables in the model view on date (date with calendar date)
I would like to show sessions evolution (%) between week w-1 et week w-2 based on today's date
(today is wednesday 09/12/2020 , week 50... I would like to display the sum of my sessions week 49 and 48)
What I tried :
Could you help to build my measure based on W-1 ?
A response would be greatly appreciated
Have a nice day
Noliverte
Solved! Go to Solution.
Hi @noliverte ,
You can create a yearweek number like this
calendar =
ADDCOLUMNS (
CALENDAR ( DATE ( 2015, 1, 1 ), TODAY () ),
"yearweek",
YEAR ( [Date] ) & "-"
& WEEKNUM ( [Date] ),
"sort",
YEAR ( [Date] ) * 100
+ WEEKNUM ( [Date] )
)
For filtering the value you want, you could create a relationship between the calendar table and the main table.
The sort column is created to sort the yearweek colulmn.
After the above steps are completed, you can create a view to filter.
You can check more details from here.
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @noliverte ,
You can create a yearweek number like this
calendar =
ADDCOLUMNS (
CALENDAR ( DATE ( 2015, 1, 1 ), TODAY () ),
"yearweek",
YEAR ( [Date] ) & "-"
& WEEKNUM ( [Date] ),
"sort",
YEAR ( [Date] ) * 100
+ WEEKNUM ( [Date] )
)
For filtering the value you want, you could create a relationship between the calendar table and the main table.
The sort column is created to sort the yearweek colulmn.
After the above steps are completed, you can create a view to filter.
You can check more details from here.
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.
| User | Count |
|---|---|
| 27 | |
| 22 | |
| 20 | |
| 18 | |
| 14 |
| User | Count |
|---|---|
| 25 | |
| 20 | |
| 20 | |
| 20 | |
| 20 |