Forum Discussion

Lanmar's avatar
Lanmar
New Member
1 year ago
Solved

Not seeing all column names when typing a DAX

When I try typing a new measure in Power BI, after typing the 'TableName', then just other measures appear for the tab autotyping.  No column names appear.  They exist though because I can see them in in data pane.  No errors or typos either.  I double checked.

  • Lanmar Sure, let's say you are creating a measure and want to reference a Value column. The measure has no context for the reference so if you reference a column, what does that even mean to the measure since there are multiple rows for every column in a table. So what is the measure supposed to "do" with that column? The measure doesn't know so you have to tell it what to do. Since there are mulitple rows you need to tell the measure how to aggregrate the column. Do you want the first row, "MIN", last row "MAX", the average of all the values for all of the rows "AVERAGE", the sum of all of the rows "SUM", etc.

    Measure = SUM( 'Table'[Column] )

    Bottom line, since there are multiple rows, it is nonsensical to reference a column without an aggregrate. Watch the first few episodes of my DAX For Humans channel: DAX for Humans - YouTube

6 Replies

  • Greg_Deckler's avatar
    Greg_Deckler
    Icon for Community Champion rankCommunity Champion

    Lanmar If you are creating a measure, then to see column names, you need to enclose the column reference in an aggregator like MAX, MIN, SUM, etc. 

    • Lanmar's avatar
      Lanmar
      New Member

      Thank you for your feedback Greg.  Can you give me an example and tell me why this "aggregate" is necessary ?

       

      • Greg_Deckler's avatar
        Greg_Deckler
        Icon for Community Champion rankCommunity Champion

        Lanmar Sure, let's say you are creating a measure and want to reference a Value column. The measure has no context for the reference so if you reference a column, what does that even mean to the measure since there are multiple rows for every column in a table. So what is the measure supposed to "do" with that column? The measure doesn't know so you have to tell it what to do. Since there are mulitple rows you need to tell the measure how to aggregrate the column. Do you want the first row, "MIN", last row "MAX", the average of all the values for all of the rows "AVERAGE", the sum of all of the rows "SUM", etc.

        Measure = SUM( 'Table'[Column] )

        Bottom line, since there are multiple rows, it is nonsensical to reference a column without an aggregrate. Watch the first few episodes of my DAX For Humans channel: DAX for Humans - YouTube

  • v-ssriganesh's avatar
    v-ssriganesh
    Icon for Community Support rankCommunity Support

    Hi Lanmar,

    Thank you for posting your query in the Microsoft Fabric Community Forum, and thanks to Greg_Deckler for sharing valuable insights.

     

    I hope provided information is helpful. Please let me know if you have any further questions or if you'd like to discuss this further. If this answers your question, please "Accept it as a solution" and give it a 'Kudos' so other community members with similar problems can find a solution faster.
    Thank you.

  • v-ssriganesh's avatar
    v-ssriganesh
    Icon for Community Support rankCommunity Support

    Hi Lanmar,
    I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If my response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.
    Thank you.

  • v-ssriganesh's avatar
    v-ssriganesh
    Icon for Community Support rankCommunity Support

    Hi Lanmar,

    May I ask if you have resolved this issue? If so, please mark it as the solution. This will be helpful for other community members who have similar problems to solve it faster.

    Thank you.