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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

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
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.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

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

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.