Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.
Hi,
Is there any way to add two scalar values as standalone?
For e.g.:
1. YTD Sales for Person 1 is 1.5 million as Sales Director
2. YTD Sales for the same person is 2.5 million as Sales Commisioner.
If I try to add them together then I get 3 million due to some underlying transaction data being same for Person 1.
How do I get 1.5 + 2.5 = 4 million (where it just straight up adds those number for that person, without not taking any other things into consideration)
Thanks,
Ritesh
Solved! Go to Solution.
@Ritesh_Air DAX will always take the context into consideration, but are you wanting this as a card visual like the screenshot shows?
In order to store calculation as a Scalar value, you need to use variables. try:
MEASURE YTD Sales All=
VAR SalesDirectorYTD = CALCULATE([YTD Sales], Role="Sales Director")
VAR SalesCommisionerYTD = CALCULATE([YTD Sales], Role="Sales Commisioner")
RETURN
SalesDirectorYTD + SalesCommisionerYTD
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
@Ritesh_Air DAX will always take the context into consideration, but are you wanting this as a card visual like the screenshot shows?
In order to store calculation as a Scalar value, you need to use variables. try:
MEASURE YTD Sales All=
VAR SalesDirectorYTD = CALCULATE([YTD Sales], Role="Sales Director")
VAR SalesCommisionerYTD = CALCULATE([YTD Sales], Role="Sales Commisioner")
RETURN
SalesDirectorYTD + SalesCommisionerYTD
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
@AllisonKennedy Thank you so much Allison. This is exactly what I was looking for!