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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Abishek
Helper I
Helper I

Custom Summarization - change the summarization expression(Formulae) based on the column type

Hi,

I have a table I need to summarize a table in power using own formulas , 

The table contains two ”Id” columns based on which I need to group by, and for summarizing first I need to check the column type, it can be  Average, sum or count any of these . baes on the Type I need to change the formulae for summarization . The formulas are  

SUM = SUM(VALUE1_AMOUNT)

AVG = dDIVIDE( SUM(VALUE1_AMOUNT) , SUM(VALUE1_WEIGHT) )

COUNT = COUNT(VALUE1_RESULT)

The result has to be in the form of a table. After getting it as a table the columns will be used in a table. And finally it has to filter when using  slicers or filters. Is it possible to achieve it ? 

 

sample_img.png

3 REPLIES 3
Anonymous
Not applicable

Hi @Abishek , 

Please have a try.

Create a measure.

Measure=VAR TABLE_=SUMMARIZE(TABLE',TABLE[VALUE1],TABLE[VALUE2],TABLE[VALUE3])
RETURN
COUNT(VALUE1_RESULT)

If I have misunderstood your meaning , please provide more details with your desired output and your pbix file without privacy inforamtion.

 

Best Regards

Community Support Team _ Polly

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

amitchandak
Super User
Super User

@Abishek , Try a measure like

 

Switch(max(Table[Value1Type])

"Sum", [Sum],

"Avg", [Avg],

"Count", [Count])

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

But I am trying to achieve using GroupBy() or Summarize() dax function , I need the value1 , value2 , value3 columns in one temp table. Is it possible ?  

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors