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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
Syndicate_Admin
Administrator
Administrator

Split values based on duplicate references

Hello

I am trying to get the final sale (after discounts), but in my current table each sale that has more than one product the total discount of the sale is repeated on each line generating that when I want to determine the total of the sale it throws me an incorrect total since it adds the total discount for each product line.

ex. For sale TGA1-20210424-115458, the total discount for the sale should be $381.4, but repeat it for each of the lines, I would like to know if I can create a formula to create a column that divides 'Discount Sale GST Exc' by the number of times the 'Reference' column is repeated.

cecitorresHF_0-1619739158142.png

7 REPLIES 7
Anonymous
Not applicable

HI @cecitorresHF,

If you are work with the default aggregation function of raw table fields, it is impossible to achieve your requirement, I think you need to use DAX expressions to write a formula.

Can you please share some dummy data with a similar data structure and expected results? It will help us clarify your scenario and test to coding formula.

How to Get Your Question Answered Quickly  

Regards,

Xiaoxin Sheng

Here I add a screenshot of what I'm looking to do, basically I need to create a column in the data table (discount) in which the discount is divided by the number of products purchased by sale (code), so that in the end the sales table looks like in the following image

cecitorresHF_0-1620256416658.png

Hi,

You do not need to create a discount column for that.  To your Table/matrix table visual, just drag The Reference field and write this measure to get the discount

Discount = min(Data[Sale discount])


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

Hi,

Share the link from where i can download your PBI file.


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

Can you tell me how to share the link?

Ashish_Mathur
Super User
Super User

Hi,

If the Discount sale GST exc is a SUM measure, then replace SUM with MIN.


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

It is not a measure, that is information that the database.

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.