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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! 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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.