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
Jacklyn
Frequent Visitor

Simple DAX calculations help needed

I have a Table named Sales, in this table there is 1st column named QTY SOLD, 2nd column column SALES PRICE, 3rd column TOTAL SALES BEFORE DISCOUNT (qty sold x sales price) and 4th column TOTAL SALES AFTER DISCOUNT (actual payment received from customer).
I need to calculate the discount applied in both $ and %, I can do this in Excel but unsure how to convert that to a DAX formula

 

Both total sales columns are in $.

 

Appreciate your help!

 

 

1 ACCEPTED SOLUTION
3 REPLIES 3
VahidDM
Super User
Super User

Hi @Jacklyn 

 

Try thesemeasures:

 

discount $ = SUM(Sales[TOTAL SALES BEFORE DISCOUNT])-SUM(Sales[TOTAL SALES AFTER DISCOUNT])
discount % = DIVIDE([discount $],SUM(Sales[TOTAL SALES BEFORE DISCOUNT]))

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.

Appreciate your Kudos!! 

Badges.jpg

LinkedIn | Twitter | Blog | YouTube 

 

 

Thanks for your help, did I do something wrong? Power Bi says that circular dependancy was detected

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.