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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
DanCasSan
Helper V
Helper V

Repeated values ​​in array

Hello partners!

 

I am performing the following calculation:

 

CFO BCP = CALCULATE(SUM(TBL_Patrimonio[MTO_CONCEPTO]),TBL_Patrimonio[DESC_CONCEPTO] IN {"CROSLAND CFO","FAMILY OFFICE BCP"})

 

But, when I put my matrix with the data it is repeating the same values ​​for each description.

What should I modify to achieve what I am putting in the formula is fulfilled? The data is in a single table.

 

result_repit.JPG

 

Thank you!

Reggards.

 

DC

1 ACCEPTED SOLUTION
mahoneypat
Microsoft Employee
Microsoft Employee

Since you are filtering the same column in your measure that is used in your visual, the measure filters are overwriting the one from the visual.  If you want to only show results for those two values, you can modify your measure like this.

 

CFO BCP = CALCULATE(SUM(TBL_Patrimonio[MTO_CONCEPTO]),KEEPFILTERS(TBL_Patrimonio[DESC_CONCEPTO] IN {"CROSLAND CFO","FAMILY OFFICE BCP"}))

 

If that is not what you are looking for, please show your desired output.

 

Regards,

Pat 





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


View solution in original post

3 REPLIES 3
Ashish_Mathur
Super User
Super User

Hi,

Does this work?

CFO BCP = CALCULATE(SUM(TBL_Patrimonio[MTO_CONCEPTO]),filter(TBL_Patrimonio,TBL_Patrimonio[DESC_CONCEPTO] ="CROSLAND CFO"&&TBL_Patrimonio[DESC_CONCEPTO] ="FAMILY OFFICE BCP"))

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
AllisonKennedy
Super User
Super User

@DanCasSan  When you use a CALCULATE it modifies the filter context of your report and gives the same value. You can either use a visual level filter or try a SUMX instead. The SUMX will keep the current filter context of your table and add the additional filter context you apply to it.

 

 

 CFO BCP = SUMX( FILTER(TBL_Patrimonio, ,TBL_Patrimonio[DESC_CONCEPTO] IN {"CROSLAND CFO","FAMILY OFFICE BCP"} ), TBL_Patrimonio[MTO_CONCEPTO])


Please @mention me in your reply if you want a response.

Copying DAX from this post? Click here for a hack to quickly replace it with your own table names

Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C

I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com

mahoneypat
Microsoft Employee
Microsoft Employee

Since you are filtering the same column in your measure that is used in your visual, the measure filters are overwriting the one from the visual.  If you want to only show results for those two values, you can modify your measure like this.

 

CFO BCP = CALCULATE(SUM(TBL_Patrimonio[MTO_CONCEPTO]),KEEPFILTERS(TBL_Patrimonio[DESC_CONCEPTO] IN {"CROSLAND CFO","FAMILY OFFICE BCP"}))

 

If that is not what you are looking for, please show your desired output.

 

Regards,

Pat 





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.