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
erfaldo
Regular Visitor

Help with relativelly "simple" mesure that ignore repeated values

Hello, 

I have spend the hole weeked trying to create a DAX mesure without success, I ask for help to the community

In the following Table I need to calculate the total of Elements "based" on column "Quantity", but I need to consider only 1 value when Detail of Element are multiple (In that case Quantity is always the same).

ElementDetailQuantityDATENom
a11010-octAAA
a21010-octAAA
a31010-octAAA
b11215-novAAA
b21215-novAAA
c11515-novAAA
c21515-novAAA
c31515-novAAA
c41515-novAAA
d2509-octBBB
e3208-octBBB
f5111-novCCC

Expected result is as follow:

  Number of Quantity
a 10
b 12
c 15
d 5
e 2
f 1

And the mesure need to be able to be calculated also at Date and Name level

 

DATE Calculated Quantity
October 17
November 28
Name Calculated Quantity
AAA 37
BBB 7
CCC 1

I get confused with the Filter level to apply 

Any help will be very appreciated

 

1 ACCEPTED SOLUTION
VahidDM
Super User
Super User

Hi @erfaldo 

Try this measure and use that in those scenarios:

Calculated Quantity = 
Var _A = SUMMARIZE('Table','Table'[Element],'Table'[Quantity],'Table'[DATE],'Table'[Nom])
return
sumx(_A,[Quantity])

 

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: 
www.linkedin.com/in/vahid-dm/

 

 



View solution in original post

2 REPLIES 2
VahidDM
Super User
Super User

Hi @erfaldo 

Try this measure and use that in those scenarios:

Calculated Quantity = 
Var _A = SUMMARIZE('Table','Table'[Element],'Table'[Quantity],'Table'[DATE],'Table'[Nom])
return
sumx(_A,[Quantity])

 

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: 
www.linkedin.com/in/vahid-dm/

 

 



Incredible simple...I was getting confused trying with filters...

Thank you for your Help!!!

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