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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
gprouse
Frequent Visitor

Add multiple selected project values

My visual is summarizing project values incorrectly since it is adding up the number of months of each project in the denominator. 

Here we can see that the values are being summarized incorrectly in the total value:

gprouse_0-1715068389870.png

The formula I use for this column is: 

Sum Baseestimat DG0 split per month rolling = IF( [Sum Baseestimat DG0 split per month] = 0,
                                                BLANK(),
    CALCULATE([Sum Baseestimat DG0 rolling]/[Sum of Months in DG0],USERELATIONSHIP('model PPM SAP Project Decision Date Final'[Shifted Project Period Dates],'Calendar'[Date]),'model PPM SAP Project Decision Date Final'[Shifted DG0 Period] = 1))
 
I was thinking of solving this problem by making a new measure with variables where I add the normal measure to a separate SELECTEDVALUE() measure, however this won't work since I see that SELECTEDVALUE() does not work when multiple slicer filters are selected.
 
Any ideas how I could summarize just the values selected seperatley for this measure so that the total value is 3,600,000?

 

1 ACCEPTED SOLUTION
HikingBIKing
Regular Visitor

Hi @gprouse 

You'll need to use the SUMX function to achieve the total value as you describe it.

I'd need a bit more information about your model, tables, and the calculations involved in the existing measures to be able to advise beyond this, but a SUMX would perform a calculation with the row context of a table, and then sum up the results, which is what you are trying to achieve.

SUMX function (DAX) - DAX | Microsoft Learn

View solution in original post

2 REPLIES 2
HikingBIKing
Regular Visitor

Hi @gprouse 

You'll need to use the SUMX function to achieve the total value as you describe it.

I'd need a bit more information about your model, tables, and the calculations involved in the existing measures to be able to advise beyond this, but a SUMX would perform a calculation with the row context of a table, and then sum up the results, which is what you are trying to achieve.

SUMX function (DAX) - DAX | Microsoft Learn

Thank you for your help! I managed to fix it by adding sumx to my formula. 
 
Sum Baseestimat DG0 split per month rolling = IF( [Sum Baseestimat DG0 split per month] = 0,
                                                BLANK(),
    CALCULATE(SUMX('model PPM SAP Project Cost',[Sum Baseestimat DG0 rolling]/[Sum of Months in DG0]),USERELATIONSHIP('model PPM SAP Project Decision Date Final'[Shifted Project Period Dates],'Calendar'[Date]),'model PPM SAP Project Decision Date Final'[Shifted DG0 Period] = 1))

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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