Forum Discussion

snaraya's avatar
snaraya
Icon for Helper II rankHelper II
2 years ago
Solved

help to rectify the formula

i am calculating a formula where 
CurrentAmount / (CurrentAmount + NextAmount) * 1000000 

example: 0.1/(0.1+59.9)*1000000 =1666.66

the below fomula works fine if i just download the data in upload as static table in power bi but while using 

 
the test column formula is : 
test =
VAR CurrentID = Table1[ID]
VAR CurrentAmount = Table1[Planned]
VAR NextAmount =
CALCULATE(
MAX(Table1[Planned]),
FILTER(
Table1,
Table1[ID] = CurrentID &&
Table1[Index] = EARLIER(Table1[Index]) + 1
)
)
RETURN
IF(
ISBLANK(NextAmount),
BLANK(),
CurrentAmount / (CurrentAmount + NextAmount) * 1000000
)

  000164 i should get 11500 but i am getting 11430. Left table is direct sharepoint connection  to the source and right is download and uploading the static table directly. So formula is right as its giving correct answer in right table. but the left is actual table which is giving wrong data

 

Thanks in advance

  • Issue got resolved, formula i used is correct . Only issue was because the planned column was not rounded off at query editor level causing output to be wrong . Thankyou 

2 Replies