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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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.


@ 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!:
The Definitive Guide to Power Query (M)

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors