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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Fresh
Frequent Visitor

How to achieve this simple formula within Power BI

How can I calculate this approach at PBI, I want to calcualte a Yield. The result schould appear at a KPI. 

Thanks in Advance

=(SUM(F3:F5)-SUM(G3:G5))/SUM(F3:F5)

8 REPLIES 8
Fresh
Frequent Visitor

 @rajulshah 
any help is appreciated, the single Sums are right but a soon as I divided the numbers I receive a NaN.

@Fresh 

 

Please use the following DAX measures:

Measure = 
DIVIDE ( COUNT [ CoulmnA ] - COUNT [ ColumnB ], COUNT [ CoulmnA ], 0 )

 

Please let me know if this didn't help.

No sorry @rajulshah , its not working. the expected result should be..

without Filter = 94%

Filter Month = 2 = 97%
Filter Month = 3 = 93% 

@Fresh ,

 

Please use following DAX:

Measure =
DIVIDE (
    SUM ( 'Table'[CounterA] ) - SUM ( 'Table'[CounterB] ),
    SUM ( 'Table'[CounterA] )
)

 

I got the following value:

rajulshah_0-1678799157103.png

Please let me know if this didn't help.

Hey, @rajulshah thanks for your assistance! But sorry I still receive a wrong value. I get the same result for each Row, even if CounterA & CounterB is 0.  Its really strange... 

@Fresh , can you post the screenshot of the input data and what output you are getting?

Because I believe that you are plotting some other columns as we are not getting the context.

Fresh
Frequent Visitor

I need (Sum(CountA) - Sum(CountB))/Sum(CountA)


DayMonthCounterACounterB
26.02.2321203
27.02.23200
28.02.2321195
01.03.2331208
02.03.23310
03.03.2331199
04.03.23312110
05.03.23300

 

rajulshah
Resident Rockstar
Resident Rockstar

@Fresh ,

 

Can you please provide us the sample data?

Power BI doesn't work as per the row numbers.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.