Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Measure not recognizing columns

I am very inexperienced with DAX and I get confused when I try to create a measure and I cant reference a coulmn from a table that I want.

 

For example if i want to use an "If" Statement with a date it wont let me reference the date column or the date table.

 

  • If you reference a column in a measure, you must wrap the column in an aggregation function like MIN, MAX, SUM, AVERAGE, etc.

9 Replies

  • Greg_Deckler's avatar
    Greg_Deckler
    Community Champion

    If you reference a column in a measure, you must wrap the column in an aggregation function like MIN, MAX, SUM, AVERAGE, etc.

    • Anonymous's avatar
      Anonymous
      Not applicable

      Any idea if there's a similar solution for string/text values?

       

      I'm having a lot of trouble with creating logical expressions based on text in measure fields.

    • Aymane's avatar
      Aymane
      Frequent Visitor

      Greg_Deckler I have the same issue but I'm not sure I understand your solution.

      I'm trying to use Switch(True() to have conditions on a date column before some calculations, but it's not working as you can see below:

       

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thanks for the reply, that makes a lot of sense now

      • equity7252's avatar
        equity7252
        Regular Visitor

        Where is the solution to this? Having the same problem.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Why bother having a DAX function named TRIM() if it cannot find any text column that you supply?  What is the point?