Forum Discussion
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
- lbendlin
Super User
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
Do not include sensitive information or anything not related to the issue or question.
If you are unsure how to upload data please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216
Please show the expected outcome based on the sample data you provided.
Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523 - snaraya
Helper II
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