cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
elenita62 Frequent Visitor
Frequent Visitor

Excel Formula to PowerBI

Hi, I am new here... 

 

I have this formula in Excel +P12/N12-1, and now I am trying to use it en PowerBI desktop and it doesn't work.

 

My calculated formula in PowerBI  is> Base = DIVIDE(sum([R15-16]),sum([R14-15]),0) and I need to add the -1 

 

Hope you can help me!

 

1 ACCEPTED SOLUTION

Accepted Solutions
KHorseman Super Contributor
Super Contributor

Re: Excel Formula to PowerBI

I may be mixing up blank/zero parsing... Try

 

Base = IF(
	ISBLANK(SUM([R14-15])),
	BLANK(),
	DIVIDE(
		SUM([R15-16]),
		SUM([R14-15]),
		0
	) - 1
)

Did I answer your question? Please mark it as a solution.

Proud to be a Datanaut!
8 REPLIES 8
KHorseman Super Contributor
Super Contributor

Re: Excel Formula to PowerBI

Have you tried literally just adding the -1 to the formula?


Did I answer your question? Please mark it as a solution.

Proud to be a Datanaut!
elenita62 Frequent Visitor
Frequent Visitor

Re: Excel Formula to PowerBI

Sure, but then I lost the group and 

 

See the results:

Formula 1.PNGFormula 2.PNGFormula 3.PNG

KHorseman Super Contributor
Super Contributor

Re: Excel Formula to PowerBI

 Base = DIVIDE(sum([R15-16]),sum([R14-15]),0) - 1


Did I answer your question? Please mark it as a solution.

Proud to be a Datanaut!
elenita62 Frequent Visitor
Frequent Visitor

Re: Excel Formula to PowerBI

When I do it in this way, the group is totally lost and I get my result and the other data from another rows... 

See the image:
Formula 4.PNG

 

KHorseman Super Contributor
Super Contributor

Re: Excel Formula to PowerBI

All those rows that show -100% have blank values in R14-15 and R15-16, so DIVIDE returns zero. Zero minus one is negative one. Negative one is negative one hundred percent. So those results are correct for the formula you wanted to replicate. That's what your excel formula would return given the same data. If you'd like those rows to return 0 instead of -1, you could do something like

 

Base = IF(
	SUM([R14-15]) = 0,
	0,
	DIVIDE(
		SUM([R15-16]),
		SUM([R14-15]),
		0
	) - 1
)

 


Did I answer your question? Please mark it as a solution.

Proud to be a Datanaut!
elenita62 Frequent Visitor
Frequent Visitor

Re: Excel Formula to PowerBI

The same result that Base = DIVIDE(sum([R15-16]),sum([R14-15]),0) - 1

KHorseman Super Contributor
Super Contributor

Re: Excel Formula to PowerBI

I may be mixing up blank/zero parsing... Try

 

Base = IF(
	ISBLANK(SUM([R14-15])),
	BLANK(),
	DIVIDE(
		SUM([R15-16]),
		SUM([R14-15]),
		0
	) - 1
)

Did I answer your question? Please mark it as a solution.

Proud to be a Datanaut!
elenita62 Frequent Visitor
Frequent Visitor

Re: Excel Formula to PowerBI

Thank you soo much!!! It worked fine!

Helpful resources

Announcements
Can You Solve These Challenge

Challenge: Can You Solve These?

Find out how to participate in the first Power BI 'Can You Solve These?' challenge.

Community News & Announcements

Community News & Announcements

Get your latest community news and announcements.

Virtual Launch Event

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Community Kudopalooza

Win Power BI Swag with Community Kudopalooza!

Each week, complete activities and be qualified in the drawing for cool Power BI Swag.

Users Online
Currently online: 161 members 2,005 guests
Please welcome our newest community members: