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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
josesonnen
Frequent Visitor

How to make a SUM of a conditional Metric

Hi everyone, I'm kind of stuck and I need your help. I'm working on a report were I have the following data. 

The Alert 1 is a new meausure created by me. What I need now is to add up all the daily alerts to show the total for each name, but I don't know how to do it. I have a separate table for calendar date and I can't create new tables o columns because I'm working with a live connection to sql. 

 

Any ideas??

 

Thank you! 

 

Name DateMetric 1 Avg last 7 days Alert 1
AAAABBBB15/07/2020 00:0097881
AAAABBBB16/07/2020 00:0056841
AAAABBBB17/07/2020 00:006579 
AAAABBBB18/07/2020 00:007780 
AAAABBBB19/07/2020 00:007876 
AAAABBBB20/07/2020 00:006273 
AAAACCCC16/07/2020 00:00121
AAAACCCC17/07/2020 00:00431
AAAACCCC18/07/2020 00:00121
AAAACCCC20/07/2020 00:0022 
1 ACCEPTED SOLUTION
v-lili6-msft
Community Support
Community Support

hi  @josesonnen 

This looks like a measure totals problem. Very common. See this post about it
https://community.powerbi.com/t5/DAX-Commands-and-Tips/Dealing-with-Measure-Totals/td-p/63376

Also, this Quick Measure, Measure Totals, The Final Word should get you what you need:
https://community.powerbi.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/547907

 

For your case, just create another measure as below:

Total = 
VAR _table = SUMMARIZE('Table',[Name],[Date],"_value",[Alert 1])
RETURN
SUMX(_table,[_value])

 

Regards,

Lin

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

View solution in original post

5 REPLIES 5
v-lili6-msft
Community Support
Community Support

hi  @josesonnen 

This looks like a measure totals problem. Very common. See this post about it
https://community.powerbi.com/t5/DAX-Commands-and-Tips/Dealing-with-Measure-Totals/td-p/63376

Also, this Quick Measure, Measure Totals, The Final Word should get you what you need:
https://community.powerbi.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/547907

 

For your case, just create another measure as below:

Total = 
VAR _table = SUMMARIZE('Table',[Name],[Date],"_value",[Alert 1])
RETURN
SUMX(_table,[_value])

 

Regards,

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Sansudhi8
Helper III
Helper III

Hi,

I think simple Metrix table will sort out this. 

 

PBI. 

I tried but it's not workink. 

The alert 1 is not a column, is a conditional measure that I created. 

The only data that I have on the database is Name and Metric 1. Avg Last 7 days and Alert 1 are measures, so what I need is to add all the alerts per day to get the total per week for each name

amitchandak
Super User
Super User

@josesonnen , what is expected output , it is not clear.

 

 

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

I want to get a table with every name a and the sum of the alerts for the last week. 

Name Sum of Alerts 1
AAAABBBB2
AAAACCCC3

 

If I use the conditional measure that I created it doesn't sum up, it only shows me average. 

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 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.

Top Solution Authors