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

Data Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more

Reply
Hamdan1234
Helper III
Helper III

Dax formula not working after merging and appending

Hello,

I have table of courses that people take . Each course has life like it is for 36 months , and 24 months etc. I got a DAX formula given below which on the basis of course taken shows whether the person again need to do the course or is he/she is updated. I merged two tables of online and classroom courses and it was working. The formula is:

ValidUntillll =
VAR _0 = ADDCOLUMNS('Classroom Training',"ValidTill", 'Classroom Training'[Class End Date]+(CONVERT(LEFT('Classroom Training'[Training Matrix.Recurrence],2),INTEGER)*DIVIDE(365,12)))
RETURN
MAXX(_0,[ValidTill])
This was working fine then I appended and merged few more tables now the formulas is not giving any error but when I put it in the table I get the below error. 
The formula is:
ValidUntillll =
VAR _0 = ADDCOLUMNS('Classroom Training',"ValidTill", 'Classroom Training'[Class End Date]+(CONVERT(LEFT('Classroom Training'[Training Matrix.Recurrence],2),INTEGER)*DIVIDE(365,12)))
RETURN
MAXX(_0,[ValidTill])
 
dsffdd.PNG
The error is above one. Is their anything wrong that I am doing? Please improve my formula and get the right formula. 
 
1 ACCEPTED SOLUTION
AlexisOlson
Super User
Super User

From the error, I would guess that you have a row in the column Classroom Training'[Training Matrix.Recurrence] that start with "on".

View solution in original post

3 REPLIES 3
v-xiaotang
Community Support
Community Support

Hi @Hamdan1234 

Is there any exception in your data? It seems that there are some text that cannot be converted to integers.

For example,

vxiaotang_0-1637649780641.png

the measure is OK, but once I put it into visual, the same prompt will appear.

vxiaotang_1-1637649860445.png

 

Best Regards,

Community Support Team _Tang

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

AlexisOlson
Super User
Super User

From the error, I would guess that you have a row in the column Classroom Training'[Training Matrix.Recurrence] that start with "on".

Yes I saw and found out there was a value of "once" in the column

Helpful resources

Announcements
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.