The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
Hi, I'm building a dashboard to do some project management. I'm looking to distinguish date notation in a table on my dashboard.
Here's an example of what I'm looking for:
Status | Start date (current view) | Start date (as I'd like to see it) | |
Project | |||
1 | Started | 1-1-2024 | 1-1-2024 |
2 | Started | 1-2-2024 | 1-2-2024 |
3 | Planned | 1-7-2024 | Week 27 |
4 | Planned | 1-8-2024 | Week 31 |
In my source table, I have put estimates of planned start dates in the dd/mm/yy format. However, it would be better to display them as weeks, as they are not as precise.
All projects I have started on, have a specific start date. Those I'd like to display with their specidic dates. Therefore the column of the dashboard would have a mix of data types. How do I do this?
I'm thinking of creating a table that distinguishes between 'planned' and 'started' projects in a binary way. After that, I'd have to make an if statement somewhere:
If [status] is [planned], then [date notation] is [rounded to weeks]
Elif [status] is [started], then [date notation] is [specific to the day]
But how and where do I do this? I'm rather new to PowerBI.
Thanks in advance!
Solved! Go to Solution.
Hi @oliverome
You can try below calculated column expression.
Column = IF('Table'[Status]="Started",FORMAT('Table'[Start date (current view)],"d-m-yyyy"),FORMAT('Table'[Start date (current view)],"""Week"" ww"))
Did I answer your question? If yes, pls mark my post as a solution and appreciate your Kudos !
Thank you~
Hi @oliverome
You can try below calculated column expression.
Column = IF('Table'[Status]="Started",FORMAT('Table'[Start date (current view)],"d-m-yyyy"),FORMAT('Table'[Start date (current view)],"""Week"" ww"))
Did I answer your question? If yes, pls mark my post as a solution and appreciate your Kudos !
Thank you~
Hi! Thanks for your reply. I don't know where to put this expression - through 'create custom column' does not seem to work. Under 'calculated column' I get if-statements, but no way to format the output.
Can you show me a bit more of how you created this expression, and where you added it?
Edited to add: Nevermind, I figured it out! Many thanks!
User | Count |
---|---|
15 | |
13 | |
8 | |
6 | |
6 |
User | Count |
---|---|
24 | |
20 | |
13 | |
9 | |
7 |