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
Syndicate_Admin
Administrator
Administrator

CALCULATE SUM BY FILTERING BY EXACT DATA

Good morning

I would like to know how I can calculate the sum of a column containing only the data "FEC-" I did so but it is not correct

=calculate(SUM(FAC_QUEST[Valor subtotal local]), FAC_Nor Documento = "FEC-" )

Diego90_0-1650634280353.png

Thank you

1 ACCEPTED SOLUTION

@Syndicate_Admin , @Diego90 
You're right, check this:

calculate(SUM('FAC_QUEST'[Valor subtotal local]), CONTAINSSTRING('FAC_QUEST'[FAC_Nor Documento], "FEC-" ))

View solution in original post

3 REPLIES 3
Syndicate_Admin
Administrator
Administrator

Grcias for answering.

I get this

Diego90_0-1650635884736.png

@Syndicate_Admin , @Diego90 
You're right, check this:

calculate(SUM('FAC_QUEST'[Valor subtotal local]), CONTAINSSTRING('FAC_QUEST'[FAC_Nor Documento], "FEC-" ))
vojtechsima
Memorable Member
Memorable Member

Hi, @Syndicate_Admin 
You're almost there but you are referring to a field that is equal to something, you need to use CONTAINS function:

=calculate(SUM(FAC_QUEST[Valor subtotal local]), CONTAINS(FAC_QUEST, [FAC_Nor Documento], "FEC-" )

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.