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
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
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.