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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

Calculated Column question

Hello Community  -  I've been tasked by management to track the days between various dates.    These date difference formulas I have already created. 

 

The 2nd part of the request, is that we need to assign orders a categorization, based on the criteria below.  

 

Quick Ship    =   Orders between 0-$40,000 have a 2nd business day after CH release date set as due date

10 Day     =    Orders between $40k - $100k have a 10 business day after CH release date set as due date

30 Day     =  Orders over 100k have a 30 day from CH release date assigned.

 

I think the way to handle this is to create a calculated column using VAR and IF to say "if order value <= 40,000 then "Quick Ship"

 

And same for the other two categories.   Then, put this calculated column as a filter on my table visual where I have the days between dates measurements.     Is this the right way go about this?

1 ACCEPTED SOLUTION
mahoneypat
Microsoft Employee
Microsoft Employee

Looks like you could just make a calculated column with a SWITCH(TRUE(), Order[Amount] <40000, "Quick Ship", Order[Amount] <100000, "10 Day" ... and so on.  You could also then make a Due Date column with another SWITCH() to add days to the CH Release Date based on the category value in the new column.

 

If this works for you, please mark it as the solution.  Kudos are appreciated too.  Please let me know if not.

Regards,

Pat

 





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


View solution in original post

2 REPLIES 2
mahoneypat
Microsoft Employee
Microsoft Employee

Looks like you could just make a calculated column with a SWITCH(TRUE(), Order[Amount] <40000, "Quick Ship", Order[Amount] <100000, "10 Day" ... and so on.  You could also then make a Due Date column with another SWITCH() to add days to the CH Release Date based on the category value in the new column.

 

If this works for you, please mark it as the solution.  Kudos are appreciated too.  Please let me know if not.

Regards,

Pat

 





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


Anonymous
Not applicable

Thanks @mahoneypat 

 

Here is the final result

 

Shipment Category =
SWITCH( TRUE(),
'Flu Shipped'[Order Value] <= 40000,"Quick Ship",
'Flu Shipped'[Order Value] < 100000,"10 Day",
"30 Day"
)

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors