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
RMV
Helper V
Helper V

mdxscript(model) (145,206)

Hi,

 

I have this graphic that shows error if I set my month slicer to 10-12, but it works perfect if I set month slicer below 10.

I'm using the same value used in the graphic for some other graphic, and it works fine.

The error message is:

"Can't load the data for this visual

MdxScript(Model) (145, 206) Calculation error in measure 'Table'[Amount]: An argument of function 'DATE' has the wrong data type or the result is too large or too small."

 

 

The formula I'm using:

Amount PY = CALCULATE(SUM(Table[Amount]),FILTER(ALLSELECTED(Table),AND(Table[Transaction Date]>=DATE(YEAR(TODAY())-1,1,1),Table[Transaction Date]<=DATE(YEAR(TODAY())-1,MONTH(MAX(Table[Transaction Date])),DAY(MAX(Table[TransactionDate]))))))

 

This is the result if I set the month slicer = 12, where the error occurred

option 11.jpg

 

This is the result if I set the month slicer = 9 which show the result perfectly

option 11.jpg 

 

This is the result if I set month slicer to 12, for another category (in this example: 09"), the graphic shows the value fine.

The graphic works well too for the other categories.

option 9.jpg

 

Hope that anyone can advise me on what caused the error and how to rectify it.

Thanks before.

 

5 REPLIES 5
v-chuncz-msft
Community Support
Community Support

@RMV,

 

You may try adding calculated columns instead of selecting Date Hierarchy.

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @v-chuncz-msft,

can you give example, please?

@RMV,

 

I just meant the following.

Capture.PNG

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @v-chuncz-msft,

 

I don't use Date Hierarchy for the axis in the graph.

I added a column with Month formula to return the month no. only.

 

What does this error mean actually, and what is the cause of the error?

@RMV,

 

Show us a complete example with dummy data so that we might find a workaround.

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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