Forum Discussion
conditional multiply
- 6 years ago
shei7141 here is the formula, add new column
New Col = CALCULATE ( MAX ( 'Table'[Total] ), ALLEXCEPT ( 'Table', 'Table'[UniqueID] ) ) * 'Table'[NewDis]I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!
⚡Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.⚡
Thanks J
sorry mate,
it does not recoganises any columns and I was expecting the followings results
shei7141 you replies are very confusing, in the last reply you inked the values which were already possible from my first solution. kind of confusing what you actually want
- shei71416 years ago
Helper III
thanks mate
but with your suggestion also, the return value was 'blank' where the total value was not filled.
Ta,
Shei
- parry2k6 years ago
Super User
shei7141 you need to revisit your question, put an excel file, and provide the calculation with the expected result. Your question is super simple and the reply has been already made but your return replies are making it super confusing. Help us to get help
- shei71416 years ago
Helper III
ok this is the story
MainItem Total Sub OriginalDis NewDis A 100 a1 10% 50% A a2 15% 5 A a3 20% 20 A a4 5% 15 A a5 50% 10 B 200 b1 30% 45 B b2 25% 25 B b3 45% 30 I created the measure for Revised Fee NewTotal =
SUMX ( VALUES ('Table'[UniqueID] ),
CALCULATE ( SUM ( 'Table'[Total] ) ) * 1
)I draw a table in Vizualisation and I get the following MainItem Total Sub OriginalDis NewDis NewTotal A 100 a1 10% 50% 50 A a2 15% 5% A a3 20% 20% A a4 5% 15% A a5 50% 10% B 200 b1 30% 45% 90 B b2 25% 25% B b3 45% 30% the desirable outcome is
MainItem Total Sub OriginalDis NewDis NewTotal A 100 a1 10% 50% 50 A a2 15% 5% 5 A a3 20% 20% 20 A a4 5% 15% 15 A a5 50% 10% 10 B 200 b1 30% 45% 90 B b2 25% 25% 50 B b3 45% 30% 60 when apply the original suggestion (i.e.
New Col = CALCULATE ( MAX ( 'Table'[Total] ), ALLEXCEPT ( 'Table', 'Table'[UniqueID] ) ) * 'Table'[NewDis]
I get the following
MainItem Total Sub OriginalDis NewDis NewTotal A 100 a1 10% 50% 150 A a2 15% 5% 15 A a3 20% 20% 60 A a4 5% 15% 45 A a5 50% 10% 30 B 200 b1 30% 45% 135 B b2 25% 25% 75 B b3 45% 30% 90