Forum Discussion

oliverome's avatar
oliverome
Regular Visitor
2 years ago
Solved

Distinguish in date notation depending on project status (planned/started)

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:

 

 StatusStart date (current view)Start date (as I'd like to see it)
Project   
1Started1-1-20241-1-2024
2Started1-2-20241-2-2024
3Planned1-7-2024Week 27
4Planned1-8-2024Week 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!

  • 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~

     

2 Replies

  • 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~

     

    • oliverome's avatar
      oliverome
      Regular Visitor

      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!