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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
timosborn
Frequent Visitor

Power BI "Event ID 22 from source MSOLAP$AnalysisServicesWorkspace cannot be found" error

this dax code returns an error in power bi, the error I get when I put the measure in a table is "error fetching data for this visual" then when clicking see details:  "an unexpected exception has occurred".

timosborn_0-1733442818281.png

 



this is the code:


Y Axis Max Finance Bar Chart-error =
VAR __tbl =

CALCULATETABLE(
SUMMARIZECOLUMNS(
DimDate[Month Short & Year],
FactProfitLossActualTGC,
"@Actual",
[gl act amount],
"@LastYear",
[GL LY Amount]
),
ALLSELECTED( DimDate )
)

VAR __max_actual = MAXX( __tbl, [@Actual] )
VAR __max_ly = MAXX(__tbl, [@LastYear] )
VAR __max_all = MAX( __max_actual, __max_ly )


RETURN
__max_actual

if i change the code by separating the 2 tables with actual & last year to the following it works ok:

Y Axis Max Finance Bar Chart working =
VAR __tbl =

CALCULATETABLE(
SUMMARIZECOLUMNS(
DimDate[Month Short & Year],
FactProfitLossActualTGC,
"@Actual",
[gl act amount]
),
ALLSELECTED( DimDate )
)

VAR __tbl_LY =

CALCULATETABLE(
SUMMARIZECOLUMNS(
DimDate[Month Short & Year],
FactProfitLossActualTGC,
"@LastYear",
[GL LY Amount]
),
ALLSELECTED( DimDate )
)

VAR __max_actual = MAXX( __tbl, [@Actual] )
VAR __max_ly = MAXX(__tbl_LY, [@LastYear])
VAR __max_both = MAX( __max_actual , __max_ly )


RETURN

__max_both

the addittion of [GL LY Amount] to the same summarise table causes issues, I don't know why.
This is are the base measures:

GL Act Amount =
VAR __tbl =
DimChartOfAccountsPL

VAR __filter_out_blank =
FILTER(
__tbl,
DimChartOfAccountsPL[AccountCategory] <> "Sales" &&
DimChartOfAccountsPL[AccountCategory] <> "Other Income"

)

VAR __sumx =

SUMX(
__filter_out_blank,
[GL Act Amount SUM]
)


VAR __switch_sales_sign =
FILTER(
__tbl,
OR(
DimChartOfAccountsPL[AccountCategory] = "Sales" ,
DimChartOfAccountsPL[AccountCategory] = "Other Income"
)
)

VAR __sumx_sales =

SUMX(
__switch_sales_sign,
-[GL Act Amount SUM]
)

RETURN
__sumx + __sumx_sales


GL LY Amount =
CALCULATE(
[GL Act Amount],
DATEADD(DimDate[Date], -1, YEAR)
)

If i check windows event viewer, i get the following error under applications:

The description for Event ID 22 from source MSOLAP$AnalysisServicesWorkspace_abfbb409-a75e-4623-b6c8-d3b99933c438 cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.

If the event originated on another computer, the display information had to be saved with the event.

The following information was included with the event:

An unexpected exception occurred. An unexpected exception occurred.

The message resource is present but the message was not found in the message table

I have installed the latest analysis services client libaries but still get the same error.  Any ideas on why this error is happening?
client libraries: https://learn.microsoft.com/en-us/analysis-services/client-libraries?view=asallproducts-allversions

I'm on Nov 24 PBI desktop version.

1 REPLY 1
v-denglli-msft
Community Support
Community Support

Hi @timosborn ,

Please provide sample PBIX files. Check if the problem can be reproduced on my end.

How to provide sample data in the Power BI Forum - Microsoft Fabric Community

Please remove any sensitive data in advance. If uploading pbix files please do not log into your account.

 

Best Regards,
Dengliang Li

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

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.