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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
jdtobon88
Helper I
Helper I

add values ​​differently

Cheers,

 

I have a table with the production history of some specific references in the plant. I need to make the sum of the references but within them there are production processes where each one of them happens again

 

example:

Reftotal units manufactured
AA33442000

 

Refworkplacesequence of operationunids
AA33441CT30R2000
AA33441CT30E2000
AA33441CT31R2000
AA33441CT32E2000
AA33441CT33R2000
AA33441CT33E2000
TOTAL REF  2000

 

I want to be able to see the sum as if it were a different count, where if I look at the reference level it should show me the 2000 and not the sum of all the processes involved

 

thanks

1 ACCEPTED SOLUTION

Hi

 

I finally solved it with another method.

 

DistinctCantidades =MAXX(DISTINCT(FactReportehoras[OrdenRef]),MAX(FactReportehoras[CantTerminada]))
 
Cantidad Fabricada = SUMX(DISTINCT(FactReportehoras[OrdenRef]),[DistinctCantidades])
 
and the metric " Cantidad Fabricada" is the one that I take to the table and it brings me the unique values ​​so they are repeated within the exercise.
 
jdtobon88_0-1631201842255.png

 

View solution in original post

3 REPLIES 3
v-angzheng-msft
Community Support
Community Support

Hi, @jdtobon88 

 

The value of the unids column is the total number. Although there are 6 rows about AA3344, the total number of AA3344 is 2000?Try to use the AVERAGE or MAX/MIN.

More questions?  please consdier sharing more details about it or a simple sample file without any sesentive information for further discussion.

 

Best Regards,
Community Support Team _ Zeon Zheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Greg_Deckler
Community Champion
Community Champion

@jdtobon88 Use AVERAGE? Need some context here. Maybe MM3TR&R - Matrix Measure Total Triple Threat Rock & Roll - Microsoft Power BI Community



Follow on LinkedIn
@ 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!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Hi

 

I finally solved it with another method.

 

DistinctCantidades =MAXX(DISTINCT(FactReportehoras[OrdenRef]),MAX(FactReportehoras[CantTerminada]))
 
Cantidad Fabricada = SUMX(DISTINCT(FactReportehoras[OrdenRef]),[DistinctCantidades])
 
and the metric " Cantidad Fabricada" is the one that I take to the table and it brings me the unique values ​​so they are repeated within the exercise.
 
jdtobon88_0-1631201842255.png

 

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

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.

Top Solution Authors