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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Jay2022
Helper IV
Helper IV

Populating a new column from a measure

I have a measure which counts the number of stores opening on certain months and i was wanting to create a new column with these values if it is possible ?

 

Any suggestions ? 

1 ACCEPTED SOLUTION
123abc
Community Champion
Community Champion

Yes, you can create a new column in Power BI using the values from a measure, but it requires a bit of a workaround since measures and columns behave differently. Hereโ€™s a step-by-step guide to help you achieve this:

  1. Create a Calculated Column:

    • Go to the โ€œModelingโ€ tab in Power BI Desktop.
    • Select โ€œNew Columnโ€.
    • Use a DAX formula to create the column. For example, if your measure is called StoreOpenings, you can use a formula like:
      StoreOpeningsColumn = [StoreOpenings]
    • This will create a new column with the values from your measure.
  2. Using a Calculated Table:

    • Sometimes, creating a calculated table might be more appropriate, especially if you need to aggregate data differently.
    • You can create a calculated table using the SUMMARIZE function to group your data by month and then add the measure values.
      StoreOpeningsTable = 
      SUMMARIZE(
          'YourTable',
          'YourTable'[Month],
          "StoreOpenings", [StoreOpenings]
      )
  3. Using Variables in Measures:

    • If you need to use the measure in a more complex calculation, you can define variables within your measure to store intermediate results.
      StoreOpeningsWithVariable = 
      VAR Openings = [StoreOpenings]
      RETURN
      Openings

These methods should help you incorporate the measure values into a new column or table. If you need more detailed guidance, there are many tutorials and community forums that can provide a...

 

Also Follow given below link, i hope this will help you:

 

Solved: Turning a measure into a column - Microsoft Fabric Community

Solved: Column Based on Values From a Measure - Microsoft Fabric Community

Blessed Friday Sale | Web Hosting | Hostinger.pk

Use Measures as Columns Using Calculation Group in Power BI

View solution in original post

3 REPLIES 3
123abc
Community Champion
Community Champion

Yes, you can create a new column in Power BI using the values from a measure, but it requires a bit of a workaround since measures and columns behave differently. Hereโ€™s a step-by-step guide to help you achieve this:

  1. Create a Calculated Column:

    • Go to the โ€œModelingโ€ tab in Power BI Desktop.
    • Select โ€œNew Columnโ€.
    • Use a DAX formula to create the column. For example, if your measure is called StoreOpenings, you can use a formula like:
      StoreOpeningsColumn = [StoreOpenings]
    • This will create a new column with the values from your measure.
  2. Using a Calculated Table:

    • Sometimes, creating a calculated table might be more appropriate, especially if you need to aggregate data differently.
    • You can create a calculated table using the SUMMARIZE function to group your data by month and then add the measure values.
      StoreOpeningsTable = 
      SUMMARIZE(
          'YourTable',
          'YourTable'[Month],
          "StoreOpenings", [StoreOpenings]
      )
  3. Using Variables in Measures:

    • If you need to use the measure in a more complex calculation, you can define variables within your measure to store intermediate results.
      StoreOpeningsWithVariable = 
      VAR Openings = [StoreOpenings]
      RETURN
      Openings

These methods should help you incorporate the measure values into a new column or table. If you need more detailed guidance, there are many tutorials and community forums that can provide a...

 

Also Follow given below link, i hope this will help you:

 

Solved: Turning a measure into a column - Microsoft Fabric Community

Solved: Column Based on Values From a Measure - Microsoft Fabric Community

Blessed Friday Sale | Web Hosting | Hostinger.pk

Use Measures as Columns Using Calculation Group in Power BI

Thanks in your 2nd example what does the "storeopenings" in brackets refer to please ? STruggling to get P Bi to accept my code when i try this 

 

StoreOpeningsTable = 
SUMMARIZE(
    'YourTable',
    'YourTable'[Month],
    "StoreOpenings", [StoreOpenings]
)
123abc
Community Champion
Community Champion

In the SUMMARIZE function, "StoreOpenings" in brackets refers to the name of the new column that will be created in the summarized table. The [StoreOpenings] part is supposed to be the measure or column that you want to summarize.

Hereโ€™s a breakdown of the SUMMARIZE function:

  • 'YourTable': The table you are summarizing.
  • 'YourTable'[Month]: The column by which you want to group the data.
  • "StoreOpenings": The name of the new column in the summarized table.
  • [StoreOpenings]: The measure or column that contains the values you want to summarize.

If Power BI is not accepting your code, it might be due to the [StoreOpenings] measure not being defined correctly. Ensure that you have a measure named [StoreOpenings] in your model. For example:

  1. Define the Measure:

    StoreOpenings = COUNTROWS(FILTER('YourTable', 'YourTable'[OpeningDate] = [SelectedMonth]))
  2. Use the Measure in SUMMARIZE:

    StoreOpeningsTable = 
    SUMMARIZE(
        'YourTable',
        'YourTable'[Month],
        "StoreOpenings", [StoreOpenings]
    )

If you donโ€™t have a measure named [StoreOpenings], you need to create it first. Hereโ€™s a complete example:

  1. Create the Measure:

    StoreOpenings = 
    CALCULATE(
        COUNTROWS('YourTable'),
        FILTER('YourTable', MONTH('YourTable'[OpeningDate]) = MONTH(TODAY()))
    )
  2. Create the Summarized Table:

    StoreOpeningsTable = 
    SUMMARIZE(
        'YourTable',
        'YourTable'[Month],
        "StoreOpenings", [StoreOpenings]
    )

Make sure that [StoreOpenings] is correctly defined and available in your model before using it in the SUMMARIZE function. If you still encounter issues, please share the specific error message youโ€™re getting, and Iโ€™ll be happy to help further!

Helpful resources

Announcements
November Fabric Update Carousel

Fabric Monthly Update - November 2025

Check out the November 2025 Fabric update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Users online (27)