This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreDid you hear? There's a new SQL AI Developer certification (DP-800). Start preparing now and be one of the first to get certified. Register now
Hello - how does one change the below to be able to use the Switch function? TIA
The goal is that for any day of the week, the date reverts to the most recent Friday.
Solved! Go to Solution.
@josevaras
You can do it this way as well:
Data Thru = TODAY() - WEEKDAY(TODAY(),16)
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
@josevaras
You can do it this way as well:
Data Thru = TODAY() - WEEKDAY(TODAY(),16)
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
Thanks for responding. Can you explain to me why type 16?
@josevaras
It sets the week start day as Saturday, check the following table so the weekday gives number three by which the date is pushed back by three days.
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
Try the following:
New Column = SWITCH(TRUE, WEEKDAY(TODAY() ) = 1 , TODAY() -2
WEEKDAY(TODAY() ) = 2 , TODAY() -3
WEEKDAY(TODAY() ) = 3 , TODAY() -4 ....., TODAY())
Check out the April 2026 Power BI update to learn about new features.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
| User | Count |
|---|---|
| 38 | |
| 38 | |
| 31 | |
| 22 | |
| 15 |
| User | Count |
|---|---|
| 74 | |
| 61 | |
| 31 | |
| 31 | |
| 23 |