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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
Anonymous
Not applicable

Multiply whole and decimal position from one value by a different factor

Hello Power BI community,

 

I am currently trying to create a column that is able to multiply a whole number and the decimal from the same value by a different factor. The value that I am trying to converse is a leadtime with the following logic:

Value: 0,2 = 1 (working) day leadtime
Value: 0,4 = 1 (working) day leadtime etc..

Value: 1 = 1 week leadtime
Value: 2 = 2 weeks leadtime etc..
Value: 3,4 = 3 weeks and 2 (working) days leadtime
Value: 4,8 = 4 weeks and 4 (working) days leadtime etc...

I want to have a column that gives the leadtime in days. For this the decimal numbers need to be multiplied by a factor of 5 and the whole numbers need to be multiplied by a factor of 7. As some leadtimes do have a whole and decimal value it is possible that the whole- and decimal number need to be multiplied seperately and summed afterwards. I cannot figure out a way to single out the whole- and decimal numbers. I could do this by setting up the SWITCH function for every single value, but I am sure there is a better way to do this. The image below is an example of the calculated column I setup for now (I am aware the else simply multiplies everything by 7 and therefore does give what I need).

Parmenion_0-1683450373378.png

 

1 ACCEPTED SOLUTION
FreemanZ
Super User
Super User

hi @Anonymous 

not sure if i fully get you, try to add a calculated column like:

Column = INT([Value])*7+([Value]-INT([Value]))*5

it worked like:

FreemanZ_0-1683453700975.png

View solution in original post

3 REPLIES 3
tamerj1
Super User
Super User

Hi @Anonymous 

for a calculated column you may try

Lead Time Conversie =
VAR String =
FORMAT ( Tbl_Artikelen[Lead Time], "#.0" )
VAR Items =
SUBSTITUTE ( String, ".", "|" )
RETURN
PATHITEM ( Items, 1 ) * 7
+ PATHITEM ( Items, 2 ) * 5

 

for a measure try

Lead Time Conversie =
SUMX (
VALUES ( Tbl_Artikelen[Lead Time] ),
VAR String =
FORMAT ( Tbl_Artikelen[Lead Time], "#.0" )
VAR Items =
SUBSTITUTE ( String, ".", "|" )
RETURN
PATHITEM ( Items, 1 ) * 7
+ PATHITEM ( Items, 2 ) * 5
)

FreemanZ
Super User
Super User

hi @Anonymous 

not sure if i fully get you, try to add a calculated column like:

Column = INT([Value])*7+([Value]-INT([Value]))*5

it worked like:

FreemanZ_0-1683453700975.png

Anonymous
Not applicable

@FreemanZ Hey, 

This gives the results I was looking for and taught me the INT function, thank you so much! 😊


Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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