The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
I would like a new calculated column date as follows: if today is monday, keep it. If not return the next monday.
Ive tried this:
NextMonday = DATEADD(Dates[Date],MOD(7-WEEKDAY(Dates[Date],3),7),DAY)
Power BI give no error, but the new column remains empty. What am I missing?
Solved! Go to Solution.
Ive tried this as well. But the formula doesnt keep the monday:
Doesit work for you:
Well this is more then I can handle 🙂
Do I just copy this in my Power BI and change
"DatesTable for my column?
Is Invoerdatum your date column?
If yes, then remove the [Date] from everywhere where it is causing the error
Thank you, no more Error. Just two small issues.
I am now using this formula:
But this is the output:
So, it return the previous Monday (and should return the next monday), and on Mondays (invoerdatum) it returns a very weird date (and should remain the same)
Can you help?
Ahh! my bad.
yes you need to create a calculated column from ColumnTools --> New Column
and paste this dax iformula there
And yes DatesTable is Dates[Date] for you
Something is still wrong?
@Reimer ,
This monday = 'Date'[Date]+-1*WEEKDAY('Date'[Date],2)+1
Next monday = 'Date'[Date]+-1*WEEKDAY('Date'[Date],2)+8
Ive tried this, but is still not quite working. If I use:
Next monday = 'Date'[Date]+-1*WEEKDAY('Date'[Date],2)+8
Then all days of the week change in the next monday. But also the mondays change in the next monday. But mondays must remain the same.
So:
Monday 1 januari --> Monday 1 januari
Thuesday 2 januari --> Monday 8 januari
Wednessday 4 januari --> Monday 8 januari
Etc.
@Reimer , Try this if not resolved yet
WAUW, it is working.
Thank you all for your great help and patience!
Ive tried this as well. But the formula doesnt keep the monday:
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
82 | |
62 | |
54 | |
51 |
User | Count |
---|---|
127 | |
118 | |
81 | |
66 | |
65 |