Forum Discussion
Add Percentage Values based on External Sales.
Hi Experts
How would you amend the current DAX Measure to add percenatge value based on External Sale. into the Measure to Column so the data and percentage values are as the excel file attached.
Excel File.
Sample PBIX
https://www.dropbox.com/s/t1lbguwygrc5nzn/PLP_Test_2%20%281%29%20%281%29.pbix?dl=0
- Anonymous5 years ago
Solution to question the % values should take the following forum..
2020 Full Year =VAR _external =SUMX (FILTER (ALL ( Logistics_ ),Logistics_[New_Reporting_Headers]="External Sales"),[__v_Act2020])VAR _Duty =SUMX (FILTER (ALL ( Logistics_ ),Logistics_[New_Reporting_Headers]="Duty"),[__v_Act2020])VAR _DutyPercentage =FORMAT(DIVIDE(_duty,_external,0),"0.0%;(0.0%)")VAR _Inbound_Freight =SUMX (FILTER (ALL ( Logistics_ ),Logistics_[New_Reporting_Headers]="Inbound Freight"),[__v_Act2020])VAR _InboundPercentage =FORMAT(DIVIDE(_Inbound_Freight,_external,0),"0.0%;(0.0%)")VAR _Warehousing_Fixed =
9 Replies
- amitchandakSuper User
Anonymous , Try one of the two measures
divide(calculate([measure 2], filter(Logistics_,Logistics_[new_Reporting_header] ="External sales")),[Measure 2])
divide(calculate([measure 2], filter(Logistics_,Logistics_[new_Reporting_header] ="External sales")),calculate([Measure 2], allselected(Logistics_)))
- AnonymousNot applicable
Solution to question the % values should take the following forum..
2020 Full Year =VAR _external =SUMX (FILTER (ALL ( Logistics_ ),Logistics_[New_Reporting_Headers]="External Sales"),[__v_Act2020])VAR _Duty =SUMX (FILTER (ALL ( Logistics_ ),Logistics_[New_Reporting_Headers]="Duty"),[__v_Act2020])VAR _DutyPercentage =FORMAT(DIVIDE(_duty,_external,0),"0.0%;(0.0%)")VAR _Inbound_Freight =SUMX (FILTER (ALL ( Logistics_ ),Logistics_[New_Reporting_Headers]="Inbound Freight"),[__v_Act2020])VAR _InboundPercentage =FORMAT(DIVIDE(_Inbound_Freight,_external,0),"0.0%;(0.0%)")VAR _Warehousing_Fixed =- v-henryk-mstfCommunity Support
Hi Anonymous ,
Good job!😋
Best Regards,
Henry
- AnonymousNot applicable
Hi Amit
Well this give me Values and % in the same column???
- AnonymousNot applicable
Hi Amit - Any thoughts its not giving the values for the percentages???
- v-henryk-mstfCommunity Support
Hi Anonymous ,
Your original link has been deleted, can you re-provide the pbix file link?
Let me know immediately, looking forward to your reply.
Best Regards,Henry
- AnonymousNot applicable
Morning Henry I have solved the question ill post solution later on - IT issues...
- v-henryk-mstfCommunity Support
Hi Anonymous ,
If this problem has been resolved, you can mark yourself or delete this post.🙂
Best Regards,
Henry
- AnonymousNot applicable
Hi henry
can the following be done
https://community.powerbi.com/t5/Desktop/Dynamically-Change-Field-Values-Standard-Table-based-on-Filter/m-p/1687551