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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
ItsMikeBelmont
New Member

Issue with DAX Calculation

Hi guys!

First of all thanks for reading and helping.

 

Ok, let's suppose i have some price data like this

OwnerSKUBRANDDATEPRICEDESCRETAIL
Company74258323A########1180Prod AWALMART
Competitor14325325B########3273Prod BWALMART
Competitor1212434C########644Prod CWALMART
Competitor12145346D########683Prod DWALMART
Company74258323A########2154Prod AWALLGREENS
Competitor14325325B########1945Prod BWALLGREENS
Competitor1212434C########733Prod CWALLGREENS
Competitor12145346D########577Prod DWALLGREENS
Company74258323A########1742Prod ATARGET
Competitor14325325B########1112Prod BTARGET
Competitor1212434C########589Prod CTARGET
Competitor12145346D########712Prod DTARGET



What i'm trying to calculate via DAX is a Price Index with this custom formula: (AVG Selling Price of my products / AVG Selling Price of my competence) * 100.

 

I have so far this two meassures:

ASP_Compete =
CALCULATE(
[ASP],
'Table'[Owner] = "Competitor"
)

ASP_Company =
CALCULATE(
[ASP],
'Table'[Owner] = "Company"
)

And a separate one for the price index wich is:

Price Index= DIVIDE(ASP_Comp, ASP_Compete) * 100

From my logic it should work fine, but when i drop into any vissual i got the error: "Error fetching data for this visual: An unexpected exception occurred"

Do you know if this is related to an issue of Power BI's version?

 

Thank u again for your answers.

 

Regards

1 ACCEPTED SOLUTION
Rupak_bi
Super User
Super User

Hi @ItsMikeBelmont ,

 

This error comes when you have very large data.

However, the logic works fine with your sample data

Rupak_bi_0-1739533168378.png

 



Regards
Rupak
FOLLOW ME : https://www.linkedin.com/in/rupaksar/

View solution in original post

1 REPLY 1
Rupak_bi
Super User
Super User

Hi @ItsMikeBelmont ,

 

This error comes when you have very large data.

However, the logic works fine with your sample data

Rupak_bi_0-1739533168378.png

 



Regards
Rupak
FOLLOW ME : https://www.linkedin.com/in/rupaksar/

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.

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.