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
kennoe
Helper I
Helper I

Sum amounts related to specific value in column

I want to sum amounts based on a value that appears in a separate column. The formula I have tried is:

 

"Revenue = CALCULATE(SUM('Initiative Funding'[Amount]),ALLEXCEPT('Initiative Funding','Initiative Funding'[Funding Status]="Expected Revenue"))". 

 

I am getting this error message:

"A single value for column 'Funding Status' in table 'Initiative Funding' cannot be determined. This can happen when a measure formula refers to a column that contains many values without specifying an aggregation such as min, max, count, or sum to get a single result."

 

I don't understand this error, as I am specifying the value required in the Funding Status column.

 

Steve

4 REPLIES 4
v-yulgu-msft
Employee
Employee

Hi @kennoe,

 

Please try this:

Revenue =
CALCULATE (
    SUM ( 'IF_Example41'[Amount] ),
    FILTER (
        ALLEXCEPT ( 'IF_Example41', 'IF_Example41'[Funding Status] ),
        SELECTEDVALUE ( IF_Example41[Funding Status] ) = "Expected Revenue"
    )
)

Best regards,

Yuliana Gu

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

Thank you. The amended formula removes the error message, however it does not show any values in the table. Things I noticed when trying to get a solution:

  1.  I used the wrong column name in my formula ("Funding Status" should have been "Funding Class") but when I corrected this I still did not get any values for the Revenue measure.
  2. The table has a filter on Funding Status to show only "Released" status. Could this prevent the measure from working, as the Funding Class value of "Expected Revenue" has a Funding Status of "Planned", not "Released"? 

Steve

 

PattemManohar
Community Champion
Community Champion

Could you please post sample input data and excepted output...




Did I answer your question? Mark my post as a solution!

Proud to be a PBI Community Champion




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.