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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.