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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
Portela
New Member

Formula work on excel but not on Power BI

Hello!

 

Apparently its a simple math formula, but it is causing me some trouble. 


In excel it works on something like that:


[Venda Mês Liq]*(0,25+((([Venda Mês Liq]/[Média ]))/2))+[Média ]*(0,25+((1-([Venda Mês Liq]/[Média ]))/2))

In power BI, I tried this:

VAR alpha = 0.25+(divide('Controle Metas'[Venda Mês Liq], 'Controle Metas'[Média ])*0.5)
VAR alpha_inverso = 0.25+((1-(divide('Controle Metas'[Venda Mês Liq],'Controle Metas'[Média ])*0.5)))
RETURN
'Controle Metas'[Venda Mês Liq]*(alpha)+'Controle Metas'[Média ]*(alpha_inverso)

But it keeps getting me different results than the one on Excel.

May some angel help me?
2 REPLIES 2
FreemanZ
Super User
Super User

Hi @Portela 

Could you explain your request in plain language? Excel formula is sometimes hard to read.

datawailor
Advocate II
Advocate II

Is 'Controle Metas'[Venda Mês Liq] a measure? I'd make it a measure like SUM('Controle Metas'[Venda Mês Liq]) and another for the other field SUM('Controle Metas'[Média ]) and then use in your formula

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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