Forum Discussion

ItsMikeBelmont's avatar
ItsMikeBelmont
New Member
1 year ago
Solved

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 Reply

  • Hi ItsMikeBelmont ,

     

    This error comes when you have very large data.

    However, the logic works fine with your sample data