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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

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

 

 

 

2017-10-18 10_41_01-Copy of 3.5. theoretische incasso abonnementskosten akf 201709 (1) - Excel.png

 

 

 

 

1 ACCEPTED SOLUTION

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.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

14 REPLIES 14
v-yulgu-msft
Employee
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

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hi @v-yulgu-msft,

 

Thanks for your reaction. how can i share my pbix files to you?

Hi @Anonymous,

 

You can upload your pbix file on onedrive and attach the shared link here.

 

Regards,
Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hi @Anonymous,

 

Try this

 

=min(DFMORDERTEMPLATES[AMOUNT])*[TOTAALBETALENDLEDEN]

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

Hi @Ashish_Mathur,

 

thanks for your response. Unfortunatly it didnt work.

 

Please see the image below. The MIN function only accepts a column reference as an argument.

 

2017-10-23 09_38_27-Analysis Contribution backlog 2943 - Power BI Desktop.png

Hi @Anonymous,

 

Your bracketing is wrong.  Close the MIN bracket before the *.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

Hi @Ashish_Mathur,

 

Thanks now its working on the right way. But i dont see the total sum on the column measure on the last row. It just give a €0.00 as total.

 

Any suggestions?

 

2017-10-24 22_53_47-Analysis Contribution backlog 2943 - Power BI Desktop.png

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.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Omega
Impactful Individual
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. 

 

Capture.PNG

Anonymous
Not applicable

@Omega

 

Thanks for your reply.

 

unfortunatly Your formula doesnt calculated the Total.

 

Would you please check the pbix file ?

 

Thanks.

 

 

 

 

Omega
Impactful Individual
Impactful Individual

@Anonymous

 

Can you please elaborate further? Isn't Total= Price Group A*C. 

Anonymous
Not applicable

HI @Omega

 

Sure mate.

 

The Price group A is based on a column            DFMORDERTEMPLATES[AMOUNT]

The column C is a measure based on                DISTINCTCOUNT(CUSTINVOICEJOUR[INVOICEACCOUNT])

 

 

 

Omega
Impactful Individual
Impactful Individual

@Anonymous 

 

I don't see the PBIX file attached 😞

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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