Creating A Table Using DAX


I am trying to create a table using DAX but keep coming up with errors and am not sure why. I have attached a screenshot and hoping someone can help.



Your DAX looks good to me. Have you gone into Power Query and checked that all of your columns are of the proper type? I find the “auto type detect” feature often gets it wrong.

If that checks out, the next thing I would do is break your measure down into component parts using variables to isolate where the problem is. This video discusses the technique for doing this in detail, and the example they use is very similar to your situation.

I hope this is helpful.

  • Brian

Hi nikeshvalji,

@BrianJ is right. Some Datetables have a Year column in Data type Text and then you will end up with that type of error message. Perhaps you can change is to Whole number.


Hey @BrianJ / @uriah1977

Thanks so much for your feedback - I really appreciated it. I realised that it was my “year” within the date table which was text and I needed to convert it to whole number before this dax formula worked.

Thanks for pointing it out both! All part of the learning process. It’s great to be a part of such a good community.

Thanks again!