Forum Discussion
How to calculate two columns based on Excel formula?
Hi guys,
I am a PowerBI noob and i would like to have your help. I have a table that with different price group called Group A
Each row on Group A has a different price which are inserted in column price group A.
I need to create a table in PowerBI for calculating the column Total. the excel formula ot the Total is price group A multiply column C.
Any suggestions to make this happens in PowerBI? do i need to make a calculated column or a measure? any examples would be grateful.
Many thanks!
Rega
Hi Anonymous,
Try this calculated field formula
=if(HASONEVALUE(DFMORDERTEMPLATES[AMOUNT]),min(DFMORDERTEMPLATES[AMOUNT])*[TOTAALBETALENDLEDEN],SUMX(SUMMARIZE(DFMORDERTEMPLATES,DFMORDERTEMPLATES[AMOUNT],"ABCD",min(DFMORDERTEMPLATES[AMOUNT])*[TOTAALBETALENDLEDEN]),[ABCD]))
Hope this helps.
14 Replies
- v-yulgu-msft
Microsoft Employee
Hi Anonymous,
If [price group A] is a column, and [C] is a measure, you only need to create a measure like below to calculate the multiply value.
Total = SUM(Table1[Price Group A])*[C]
To help us better understand your scenario, please provide detailed data in source table and show us all necessary formulas you have used in this report.
Regards,
Yuliana Gu- AnonymousNot applicable
- v-yulgu-msft
Microsoft Employee
Hi Anonymous,
You can upload your pbix file on onedrive and attach the shared link here.
Regards,
Yuliana Gu
- Omega
Impactful Individual
Create a measure called Total:
Total = SUM(Table1[Price Group A])*SUM(Table1[C])
Create a table and drag all the columns including total.