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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
ashc_cool10
Helper III
Helper III

How to do Sum of a measure and column value

Hi There,

I am struggling to create a simple calculation and it might be sound so silly but please help me.

I am trying to create Sum of two values(A+B) in which A is a calculative Measure and B is Column present in data.

I am not sure what logic i am missing. Request you to please help.

Please see below data with desire result:Capture.JPG

 

I hope to receive answer soon. @Greg_Deckler @Ashish_Mathur  please help.

 

Thanks 

Ashish

1 ACCEPTED SOLUTION

Hi @Anand24 

 

So i have just created one more meausre where i took the Sum of that Sales Column

Measure_2=sum(Sales)

and then i simply added both of the measures:

Total =[Cummulative Total]+[Measure_2]

 

Regards,

Ashish

View solution in original post

9 REPLIES 9
Anand24
Super User
Super User

@ashc_cool10 ,
Please post your solution here and mark it as a solution so that others with similar issue would find help !

PBI_SuperUser_Rank@1x.png  

Give a Thumbs Up if this post helped you in any way and Mark This Post as Solution if it solved your query !!!

Proud To Be a Super User !!!
LinkedIn

 

Hi @Anand24 

 

So i have just created one more meausre where i took the Sum of that Sales Column

Measure_2=sum(Sales)

and then i simply added both of the measures:

Total =[Cummulative Total]+[Measure_2]

 

Regards,

Ashish

Anand24
Super User
Super User

Hi @ashc_cool10 ,
Try the below DAX in a new measure:

Total = [Cummulative Total] + SUM(Sales)

 This is with an assumption that "Cummulative Total" is name of calculated measure and "Sales" is the name of column.

PBI_SuperUser_Rank@1x.png  

Give a Thumbs Up if this post helped you in any way and Mark This Post as Solution if it solved your query !!!

Proud To Be a Super User !!!
LinkedIn

Hi @Anand24 ,

 

I already treid this but values are not coming right.

ashc_cool10_0-1679596058363.png

here [Better RT] is measure and HSLVT is our column which is available in data 

ashc_cool10_1-1679596168362.png

54014036.1+49327817=103341853

here vlaues in Total_2 in row 1st should appear 54014036.1+49327817=103341853 

Hi,

Share the download link of the PBI file.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Hi @Ashish_Mathur ,

 

I am able to solve this issue but thanks again for your prompt resposne.

 

Thanks,

Ashish

You are welcome.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

@ashc_cool10 Check the implicit aggregation on HSLVT in your table. Make sure it is Sum and not something like Min or Max or Average. If it is, then change SUM to MIN, MAX, AVERAGE, etc.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...

Hi @Greg_Deckler ,

 

It was in SUM only and fortuantely i am able to solve that issue.

 

Cheers!

Ashish

Helpful resources

Announcements
March Fabric Community Update

Fabric Community Update - March 2024

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

Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.