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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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