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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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