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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

get infinity and empty result on measure not sure why

I have one table called cars with columns price and service:

e.g.

service       price

Leasing     20000

Leasing     15000

Leasing     16000

Buying      2000000

Buying      3000000

 

I added to the table the measure as below to calculate my yield of leasing a car vs buying:

 

Yield % =
Var Leasing= CALCULATE([Average Price], car[service]="Leasing")*12
Var Buying = CALCULATE([Average Price], car[service]="Buying")
Return Leasing/Buying*100
 
But I get infinity and empty result on all not sure why.  Price column is ok and Average price is just measure off average of price and also looks ok.
9 REPLIES 9
v-yingjl
Community Support
Community Support

Hi @Anonymous ,

 

If you've fixed the issue on your own please kindly share your solution. If the above posts help, please kindly mark it as a solution to help others find it more quickly. Thanks!


Best Regards,
Yingjie Li

v-yingjl
Community Support
Community Support

Hi @Anonymous ,

Seems like you have used wrong filter expression to cause this issue.

When filter in the expression, you need to use all() to clear all the filters in the table then create a new filter term in the expression.

The right expression should be like @Tahreem24  mentioned:

Yield % =
VAR Leasing =
    CALCULATE (
        [Average price],
        FILTER ( ALL ( Car ), 'Car'[Service] = "Leasing" )
    ) * 12
VAR Buying =
    CALCULATE ( [Average price], FILTER ( ALL ( Car ), 'Car'[Service] = "Buying" ) )
RETURN
    ( Leasing / Buying ) * 100

table result.png

 

Best Regards,
Yingjie Li

If this post helps then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

Wow thanks a lot for the hard work.  It sstill shows ALL INFINITY,   not sure why !

 

 

I uploeaded the data here so you can see: data.csv

 

https://drive.google.com/file/d/16pi6gZdT0EIczBP159iKe5LF5WxyXvm5/view?usp=sharing

Hi @Anonymous ,

 

 

Yield % =
Var AveragePrice = AVERAGE('Table'[price])

Var Leasing= CALCULATE(AveragePrice, 'Table'[offer_type]="Rent")*12
Var Buying = CALCULATE(AveragePrice, 'Table'[offer_type]="Sale")
Return
DIVIDE (Leasing,Buying)
 
 
1.jpg

Regards,
Harsh Nathani

Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)

 
az38
Community Champion
Community Champion

@Anonymous 

try

Yield % =
100 * 
DIVIDE(
CALCULATE(AVERAGE(car[Price]), car[service]="Leasing")*12,
CALCULATE(AVERAGE(car[Price]), car[service]="Buying"),
0
)

do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn
Anonymous
Not applicable

Now I got all values as zero....  strange.  I put the columns in table to see, and average price cloumn is all kind of values and the yiled % is zero....   so not working

are you using a whole number or a decimal, add 2 decimal places as maybe you can't see the value.





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




Anonymous
Not applicable

It is decmila,  0.00.... very strange

@Anonymous ,

Try the below measure:

 

Yield % 1 =
Var L = CALCULATE(AVERAGE('Tbl'[Price]),FILTER(ALL('Tbl'),'Tbl'[Service]="Leasing"))*12
Var B = CALCULATE(AVERAGE('Tbl'[Price]),FILTER(ALL('Tbl'),'Tbl'[Service]="Buying"))
Return IFERROR((L/B),0)
 
I got 8.16%.
 
Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created dashboards : Restaurant Management Dashboard , HR Analytics Report , Hotel Management Report, Sales Analysis Report , Fortune 500 Companies Analysis , Revenue Tracking Dashboard

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors
Top Kudoed Authors