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

The FabCon + SQLCon recap series starts April 14th at 8am Pacific. If you’re tracking where AI is going inside Fabric, this first session is a can't miss. Register now

Reply
wokka
Helper IV
Helper IV

How to sum a column when pulling data from semantic model?

Hi

 

I created a simple 2 column table on my powerbi desktop using "Table" in the visualizations.

 

I dragged in a measure column [ sale_date ] and a dimension column [widgets].

The dimension column I just want to get the sum of the whole column.

 

I cant use powerquery due to security reasons, so all I have is powerbi desktop and I want to hopefully create a measure using DAX so I can take the sum of [widgets] column and make it available via a measure, so I can graph the answer.

 

When I try to do a   =sum(<table.[column])   I cant seem to get it to work.

 

I'm strugging to understand whats wrong as Ive been given this task, but not a lot of training. 

 

Any help would be really appreciated. 🙂

1 ACCEPTED SOLUTION
DataNinja777
Super User
Super User

Hi @wokka ,

 

If you're working in Power BI Desktop and pulling data from a semantic model (such as a published dataset or Analysis Services), then your ability to write DAX measures depends on whether you're allowed to extend the model. If you're in a pure live connection mode, Power BI won’t let you create new measures unless you're using DirectQuery for Power BI datasets (composite models). If that’s enabled, click “Make changes to this model” when prompted, and you’ll be able to create a new measure.

To create a DAX measure that sums the [Widgets] column, you can write:

Total Widgets = SUM('YourTableName'[Widgets])

Replace 'YourTableName' with the actual name of your table in the model. If [Widgets] is already a measure and not a raw column, don’t try to wrap it in SUM() again—just use it directly. If your model doesn’t support adding measures, you won’t see the option to create one, and you’ll need to enable composite model mode via File > Options > Preview features > DirectQuery for Power BI datasets and restart Power BI. Once done, you can add your own measures and use them in visuals like any other field.

 

Best regards,

 

 

View solution in original post

3 REPLIES 3
v-sdhruv
Community Support
Community Support

Hi @wokka ,
Since I didnt hear back from you I am assuming you are still facing the issue.
I would encourage you check the data type-
Make sure  [widgets] is a numeric column. If it’s text, sum() will not work.
If thats already a numeric field, and still you encounter an error, can you share more information about the issue like-the error details, data source, type of connection?
So that it we be easy for us to resolve the issue.
Thank You
If this post helps, please give us Kudos and consider marking it Accept as solution to assist other members in finding it more easily.

v-sdhruv
Community Support
Community Support

Hi @wokka ,
Just wanted to check if you had the opportunity to review the suggestion provided?
If the response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.
Thank You

DataNinja777
Super User
Super User

Hi @wokka ,

 

If you're working in Power BI Desktop and pulling data from a semantic model (such as a published dataset or Analysis Services), then your ability to write DAX measures depends on whether you're allowed to extend the model. If you're in a pure live connection mode, Power BI won’t let you create new measures unless you're using DirectQuery for Power BI datasets (composite models). If that’s enabled, click “Make changes to this model” when prompted, and you’ll be able to create a new measure.

To create a DAX measure that sums the [Widgets] column, you can write:

Total Widgets = SUM('YourTableName'[Widgets])

Replace 'YourTableName' with the actual name of your table in the model. If [Widgets] is already a measure and not a raw column, don’t try to wrap it in SUM() again—just use it directly. If your model doesn’t support adding measures, you won’t see the option to create one, and you’ll need to enable composite model mode via File > Options > Preview features > DirectQuery for Power BI datasets and restart Power BI. Once done, you can add your own measures and use them in visuals like any other field.

 

Best regards,

 

 

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.