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

Summing the numbers from measures

Hi All,
 

My issue is that I am unable to add up the highlighted numbers below to show the total of  €7,207

 
community1.PNG
If I try with the following formula, it will count all the numbers above
Discounted_Total = [Discount1] + [Discount2]
 
Discount1 and Discount2 are measures and using the below logic;
(only difference are the highlighted numbers which represent the discount)
community2.PNGcommunity3.PNG
 
I was hoping to append the formula for discount1 and discount2 as follows but unfortunately the 'Country' field is not available, I can only choose measures, not fields.
 
Discount1 = If( country = "Irish Request",
VAR Total = [NoOfCalls]
VAR T1 = IF (Total >1000,1000, Total)
VAR T2 = IF ((Total >1000) && (Total <1500),Total - 1000, 500)
VAR T3 = IF (Total >1500,Total - 1500, 0)
VAR Cost = IF (Total >1000, T1*2 + T2 *1.7 + T3 *1.4, Total*2)
RETURN IF(ISBLANK(Cost),0,Cost)
 
Can you please help me to sum 4,108 and 3,099? Is there any function I could use?
 
 Thanks,
 
1 ACCEPTED SOLUTION
tamerj1
Super User
Super User

Hi @Anonymous 

you can try

Discounted_Total =
CALCULATE ( [Discount1], Table[Country] = "Irish Request" )
    + CALCULATE ( [Discount2], Table[Country] = "UK Request" )

 

 

 

View solution in original post

2 REPLIES 2
tamerj1
Super User
Super User

Hi @Anonymous 

you can try

Discounted_Total =
CALCULATE ( [Discount1], Table[Country] = "Irish Request" )
    + CALCULATE ( [Discount2], Table[Country] = "UK Request" )

 

 

 

Anonymous
Not applicable

thanks man! 🙂 I spent 5 hours today trying

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.

Top Solution Authors