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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
ContabilidadBI
Helper III
Helper III

Can't select Data Type for a mesure?

Hello guys,

 

I have created a few numeric measures and I wanted them to agregate by average, not sum, but when I try to change it like in any column I can't select the data type or the agregation type:

 

Captura.PNG

 

What's going on here? I can't show the total of this measure by average?

 

Thanks!!!

4 REPLIES 4
shwetak
Frequent Visitor

Hey, I am also getting the same issue. Not able to change Data type for a "MEASURE" field.

 

Anyone is able to tell, any work around. 

Greg_Deckler
Super User
Super User

Measures don't really work that way, they are aggregated as part of their formula. You could create another measure using SUMMARIZE perhaps and use that table to get the average of the measure. Or, there might be a completely different solution but I would need to understand the base data and your end goal and perhaps there is another way of attacking the problem.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...
SqlJason
Memorable Member
Memorable Member

A measure is made with a DAX expression, and it already has the aggregator in it.  For eg, if your column name is [Sales], you can make a measure called 

TotalSumSales = sum([Sales])

You wouldn't be able to change the aggregation for measures. (and you can know a measure by the "calculator" icon before it's name in the field list.

 

You can change the aggregation for the column name though. For eg, for [Sales], you can click on the column name and change it's aggregation.

 

I think you are clicking on a measure and not the base column of the measure.


@SqlJason wrote:

A measure is made with a DAX expression, and it already has the aggregator in it.  For eg, if your column name is [Sales], you can make a measure called 

TotalSumSales = sum([Sales])

You wouldn't be able to change the aggregation for measures. (and you can know a measure by the "calculator" icon before it's name in the field list.

 

You can change the aggregation for the column name though. For eg, for [Sales], you can click on the column name and change it's aggregation.

 

I think you are clicking on a measure and not the base column of the measure.


 

Thanks for your answer Jason,

 

Can you explain further the last part of your post? I know the calculator icon shows me that is a measure but I don't know where is the base column of the measure you say, in the query editor?

 

Here is a table I want the totals of the last 2 columns (which are measures) to show by average, right now it will be the same because there is only data for January but when data for febreary comes it will sum the two months. Is what a want possible to do?

 

Captura.PNG

 

 

Thank you so much and good luck!!

 

 

Helpful resources

Announcements
Sept PBI Carousel

Power BI Monthly Update - September 2024

Check out the September 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

Find out what's new and trending in the Fabric Community.