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

The FabCon + SQLCon recap series starts April 14th at 8am Pacific. If you’re tracking where AI is going inside Fabric, this first session is a can't miss. Register now

Reply
Anonymous
Not applicable

Not able to get sum of a calculated measure

Hi folks,
My data source is given  below,

bharathsurya_0-1605285813706.png            

Result required in Power BI 

bharathsurya_1-1605285936344.png

 

 

 

 

 

 

 

Formula for Yield 2018 is, 
IF(AND(Sale 2018<=0,Sale 2019<=0),0,IF(Sale 2018<=0,Sale 2019,0))


I'm not able to get the sum 110 and 50 (Sum of yields) in Power BI.

Please help.

Thank you

 

 

 

3 ACCEPTED SOLUTIONS
ryan_mayu
Super User
Super User

@Anonymous 

you can try this

Measure = sumx(VALUES('Table'[Customer]),[Yield 2018])

1.png

Below is the pbix file for your reference

 





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

Proud to be a Super User!




View solution in original post

@Anonymous 

Please see the attachment.

 





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

Proud to be a Super User!




View solution in original post

@Anonymous 

maybe you can try this workaround,pls see the updated atatchment.





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

Proud to be a Super User!




View solution in original post

5 REPLIES 5
Anonymous
Not applicable

Thanx @ryan_mayu
Ur solution is working well when all the numbers are positive. 
Can you help me find a solution when number are negative too. I have given a sample data below,

DateCustomerSale
1/1/2018A10
1/1/2018B20
1/1/2018C30
1/1/2019C40
1/1/2019D-50
1/1/2019E60
1/1/2019B50
1/1/2020C40
1/2/2020F30
1/3/2020G-20


Thank you.

@Anonymous 

Please see the attachment.

 





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

Proud to be a Super User!




Anonymous
Not applicable

@ryan_mayu 
Thank you! It worked...
How can I dynamically change the yield on year selection on slicer?

@Anonymous 

maybe you can try this workaround,pls see the updated atatchment.





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

Proud to be a Super User!




ryan_mayu
Super User
Super User

@Anonymous 

you can try this

Measure = sumx(VALUES('Table'[Customer]),[Yield 2018])

1.png

Below is the pbix file for your reference

 





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

Proud to be a Super User!




Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.