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
marcio_fornari
Resolver I
Resolver I

Measure repeating values for table

Hello,

I have a table with 2 columns.. Type and Value

marcio_fornari_0-1611057504001.png

 

Measure 1: 

toPay = 
CALCULATE(
    SUM(PAYMENTS[value]),
    PAYMENTS[type] = "pay"
)

 

Measure 2:

toReceive = 
CALCULATE(
    SUM(PAYMENTS[value]),
    PAYMENTS[type] = "receive"
)

 

The table is reapeating values for pay and receive, why?

marcio_fornari_1-1611057647979.png

 

I think this solution is:

marcio_fornari_2-1611057671048.png

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@marcio_fornari , Try like

 

toPay =
CALCULATE(
SUM(PAYMENTS[value]),
filter(PAYMENTS, PAYMENTS[type] = "pay")
)

 

toReceive =
CALCULATE(
SUM(PAYMENTS[value]),
filter(PAYMENTS,PAYMENTS[type] = "receive")
)

 

refer : dataap.org/blog/2019/04/22/difference-between-calculate-with-and-without-filter-expression/

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

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@marcio_fornari , Try like

 

toPay =
CALCULATE(
SUM(PAYMENTS[value]),
filter(PAYMENTS, PAYMENTS[type] = "pay")
)

 

toReceive =
CALCULATE(
SUM(PAYMENTS[value]),
filter(PAYMENTS,PAYMENTS[type] = "receive")
)

 

refer : dataap.org/blog/2019/04/22/difference-between-calculate-with-and-without-filter-expression/

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

Thanks @amitchandak it's works!!
Thanks for the Refer too 🙂

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.