Forum Discussion
Selecting default - week value dynamically
- Anonymous3 years ago
Hi Anonymous ,
Here are the steps you can follow:
1. Then we find the "Preselected Slicer" and add the visual to our Power Bi Desktop.
2. First , we need to create a table with one column , and the value is True and False,.
3. Second , we can create a measure to define which the date we need to default preselected. If we need to default preselect then we return True else return False.
Flag = var _date =SELECTEDVALUE('Table'[WEEK]) return IF(_date = WEEKNUM(TODAY(),2) , TRUE(),FALSE())4. Then we can put the 'Table'[Date] in the Fields , [Flag] in the Pre Selection , 'Dirty Table'[Dirty Status] in the Dirty Status, like below screenshot:
5. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi Anonymous ,
Here are the steps you can follow:
1. Then we find the "Preselected Slicer" and add the visual to our Power Bi Desktop.
2. First , we need to create a table with one column , and the value is True and False,.
3. Second , we can create a measure to define which the date we need to default preselected. If we need to default preselect then we return True else return False.
Flag =
var _date =SELECTEDVALUE('Table'[WEEK])
return
IF(_date = WEEKNUM(TODAY(),2) , TRUE(),FALSE())
4. Then we can put the 'Table'[Date] in the Fields , [Flag] in the Pre Selection , 'Dirty Table'[Dirty Status] in the Dirty Status, like below screenshot:
5. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly