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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
melodypoh
Frequent Visitor

Simple DAX calculation wrong

Hi, I just started using Power BI so I am slowly navigating as I go. 

 

I am trying to recreate a report that I did in Excel but a simple calculation of (x-y)/x doesn't work in Power BI. A couple of them come out okay, mostly just NaNs. I know it works because it does in my Pivot table (pic 2). I tried both SUM and Average. Only average gave me a few correct answers.

 

Thank you in advance!

 

1.PNG2.PNG

1 ACCEPTED SOLUTION

Hi @melodypoh,

 

My former formula missed a parenthesis, sorry:

 

BAND= Divide( Sum(Data[Q List])-Sum(Data[Q Band]),Sum(Data[Q List}),blank()).

Try trhis Please

 

Ninter

View solution in original post

11 REPLIES 11
Interkoubess
Solution Sage
Solution Sage

Hi @melodypoh,

 

Did you try for example :

 

BAND= Divide( Sum(Data[Q List]-Sum(Data[Q Band]),Sum(Data[Q List}),blank()).

 

Let us know.

 

Ninter

It didn't... Please see the screenshot.

Hi @melodypoh,

 

What is the name of your table?

 

I wrote Data because I thought it was named Data, please replace Data by the real name.

 

Let us know...

 

Ninter

Anonymous
Not applicable

Sloppy typing. You're missing a close parentheses and you used a curly bracket instead of a square bracket.

 

BAND = DIVIDE(
	SUM(Data[Q List]) - SUM(Data[Q Band]),
	SUM(Data[Q List]),
	BLANK()
)

Yeah I was typing too quickly.

 

Thank you @Anonymous.

 

@melodypoh please try the corrected one and let us know.

 

Ninter

Looks like they all produced the same answers. Wow, is this supposed to be this complicated? 

 

4.PNG

Hi,

 

Looks like there is some relationship missing.  Share the link from where i can download your workbook.


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

Are you adding this formula as a column? It should be a measure I think.

Hi @melodypoh,

 

Yes as @Anonymous explained, it should be a measure, not a column.

Do you want it to be in column?

 

Ninter

Anonymous
Not applicable

@Interkoubessah yeah looks like you caught it at the same time I did. Cool.

Hi @melodypoh,

 

My former formula missed a parenthesis, sorry:

 

BAND= Divide( Sum(Data[Q List])-Sum(Data[Q Band]),Sum(Data[Q List}),blank()).

Try trhis Please

 

Ninter

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.