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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Ericwhv
Helper II
Helper II

Cost per KG changes is not working

Hi All

thank you for reading this first

i am working on some COST / KG changes in %, but not sure why the result is showing like below

the result are all the same....

Ericwhv_0-1666781090408.png

 

my formula as below

COST = SUM(cost)

CH_WGHT_SYSTEM = SUM(Weight)

ACH_COST_KG = [COST]/[CH_WGHT_SYSTEM]
ACH_COST_KG(by15%) = DIVIDE([COST],[CH_WGHT_SYSTEM(by15%)])
COST_KG Difference(by15%) = [ACH_COST_KG(by15%)] - [ACH_COST_KG]
COST_KG change(by15%) = [COST_KG Difference(by15%)]/[ACH_COST_KG]

 

i beleive something not right on the last formula, but not sure what is the issue, please help, thank you!!

1 ACCEPTED SOLUTION
Mikelytics
Resident Rockstar
Resident Rockstar

Thakn you, This is a general problem in what

- you are calculating there. YOu calculate cost per kg

- Then you reduce it by 15%

- then you divide the two values above again -> in this scenario the result is everytime 17,65%

 

If you calculate 0,85* 1,1765 then you get 1 again.

 

SO it is not a technical problem its more the nature of your calculation. Do this in Excel and you should get the same results again. 

 

Best regards

Mikelytics

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

------------------------------------------------------------------
Visit my blog datenhungrig which I recently started with content about business intelligence and Power BI in German and English or follow me on LinkedIn!

View solution in original post

5 REPLIES 5
mangaus1111
Solution Sage
Solution Sage

Hi @Ericwhv ,

 

see my sample model here for calculating percentage. I hope it helps.

https://1drv.ms/u/s!Aj45jbu0mDVJiyzIDA3ZUs-mwqyq?e=JbewcX

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Ericwhv
Helper II
Helper II

Thank you @Mikelytics 

i have done this in Excel
but similar to what you say, the result is very similar, 17.xx%
i dont know if my logic is right or not, lol thank you

Ericwhv_0-1666783767575.png

 



Mikelytics
Resident Rockstar
Resident Rockstar

Thakn you, This is a general problem in what

- you are calculating there. YOu calculate cost per kg

- Then you reduce it by 15%

- then you divide the two values above again -> in this scenario the result is everytime 17,65%

 

If you calculate 0,85* 1,1765 then you get 1 again.

 

SO it is not a technical problem its more the nature of your calculation. Do this in Excel and you should get the same results again. 

 

Best regards

Mikelytics

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

------------------------------------------------------------------
Visit my blog datenhungrig which I recently started with content about business intelligence and Power BI in German and English or follow me on LinkedIn!
Ericwhv
Helper II
Helper II

CH_WGHT_SYSTEM(by15%) = sum(Weight)*0.85
(Assume the weight drop 15%)
Thank you!

Mikelytics
Resident Rockstar
Resident Rockstar

Hi Ericwhv,

 

what is the formula for the measure [CH_WGHT_SYSTEM(by15%)]?

------------------------------------------------------------------
Visit my blog datenhungrig which I recently started with content about business intelligence and Power BI in German and English or follow me on LinkedIn!

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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