Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
irnm8dn
Post Prodigy
Post Prodigy

Dashboard Logic and Question

Looking for some suggestions here with a dashboard I am creating for my business team.

 

I am trying to assign a value in a column based on a date.  Simply put is something is sold <= the 15th of the month, then "Early".  >15th of the month "Late".  

 

I have never done this as it petains to date and I am looking for suggestions.

 

1 ACCEPTED SOLUTION

In Power BI, a dashboard is an object in the power bi service. This sounds like you need a new column in one of your tables. You can create a calculated column using an if statement. The syntax is almost the same as excel

 

=if(day(table[date]) <=15,"Early","Late")



* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.

View solution in original post

6 REPLIES 6

In Power BI, a dashboard is an object in the power bi service. This sounds like you need a new column in one of your tables. You can create a calculated column using an if statement. The syntax is almost the same as excel

 

=if(day(table[date]) <=15,"Early","Late")



* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.

@MattAllington

 

How can I concatenate the value of Early or Late with Month and Year?

 

i.e. June 2017 - Late

The same as you would in Excel.   table[Column1] & " - ' & table[Column2]



* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.

@MattAllington

 

I thought so as well, however the format is the full date display i.e. 12/12/2017 - Early

 

and I am looking for December 2017 - Early

 

If I format my date column to MM YYYY, once concatenated it displays 12/12/2017 - Early.  Once I concatenate I cannot reformat the date portion of the display.

 

Thanks again for your input - it's what powers the PBI community.

I was intending that you use the month column (sorry that wasn't clear)

 

=if(day(table[date]) <=15,Calendar[MM YYYY] & " - ' & "Early",Calednar[MM YYYY] & " - ' & "Late")

 

I guess this will also work

 

=if(day(table[date]) <=15,format(Calendar[date],"MM YYY") & " - ' & "Early",format(Calendar[date],"MM YYY") & " - ' & "Late")



* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.

@MattAllington

 

Thanks!

 

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.