Forum Discussion
filter table by year and weekyear
- 5 years ago
Hi noliverte ,
When I reply you the current week is 51, so you want to show data about text 50 right?
You can create a measure like this, put it in the table visual filter and set its value as 1:
A = IF ( WEEKNUM ( TODAY (), 2 ) - 1 = WEEKNUM ( SELECTEDVALUE ( 'Table'[Date] ), 2 ), 1, 0 )Attached the sample file in the below, hopes to help you.
Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi v-yingil,
Congratulation it works fine.
Thank you very much for your precious help.
I've added a if statement to fit with my final report
A =
IF(
YEAR(TODAY())
= YEAR(SELECTEDVALUE('Table'[Date])),
IF (
WEEKNUM ( TODAY (), 2 ) - 1
= WEEKNUM ( SELECTEDVALUE ( 'Table'[Date] ), 2 ),
1,
0
),
0
)One last request with your pbix.
In my final powerbi file, I have to hide the date fied to only show explanations...
Do you know how i could remove this field from my table?
In your file, if I remove this date field from the table, the explanation field also disappears
Have a nice day
Noliverte
Hi,
I just found a way to hide date field...
I replace Table viewer by HTML5 viewer
And the table vs html5 component
left : Table
right : html 5 component