cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
bharathsurya
Helper I
Helper I

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 II
Super User II

@bharathsurya 

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

@bharathsurya 

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

@bharathsurya 

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
bharathsurya
Helper I
Helper I

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.

@bharathsurya 

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

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

@bharathsurya 

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

ryan_mayu
Super User II
Super User II

@bharathsurya 

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

Helpful resources

Announcements
PBI_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

MBAS on Demand

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Get Ready for Power BI Dev Camp

Microsoft named a Leader in The Forrester Wave

Microsoft received the highest score of any vendor in both the strategy and current offering categories.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Top Kudoed Authors