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
TotunG
Resolver I
Resolver I

Measure for showing lowest cost/week this is in

Hi all,

 

I have the following data table:

 

GroupCodeStockCostDate
AREJI3Apple2140107/01/22
AFDJDA2Banana50007/01/22
BEFAF3Shoes4259414/01/22
BDSKOAJT-Shirt22414/01/22
BDSJSISTrouser2412114/01/22
AREJI3Apple5315114/01/22
AFDJDA2Banana20014/01/22
CSDAIDJABeer421414/01/22
CDSLA2Wine88621/03/22
CDSJIJIJ5Rum45421/03/22
DSOOO2Dog5332

08/06/22

 

I basically want a measure that would show me the lowest cost by group of product (A, B, C, D etc.), (maybe with the option of drilling down further into the actual stock too). This would then show the corresponding date where the SUM of Cost 'By Group' is lowest.

 

For a small example the below would return for Group A as the SUM Cost (21401+500) < (53151+200) making 07/01/22 the Date where Cost is lowest.

 

GroupCodeStockCostDate
AREJI3Apple2140107/01/22
AFDJDA2Banana50007/01/22

 

 

 

1 ACCEPTED SOLUTION
v-jialluo-msft
Community Support
Community Support

Hi  @TotunG ,

 

Please follow these steps:
(1) Create a new measure

SUM = CALCULATE(SUM('Table'[Cost]),ALLEXCEPT('Table','Table'[Group],'Table'[Date]))

(2)Apply filtering

vjialluomsft_0-1670305170720.png

 


(3)Final output

vjialluomsft_1-1670305200569.png

 

 

Best Regards,
Gallen Luo
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

1 REPLY 1
v-jialluo-msft
Community Support
Community Support

Hi  @TotunG ,

 

Please follow these steps:
(1) Create a new measure

SUM = CALCULATE(SUM('Table'[Cost]),ALLEXCEPT('Table','Table'[Group],'Table'[Date]))

(2)Apply filtering

vjialluomsft_0-1670305170720.png

 


(3)Final output

vjialluomsft_1-1670305200569.png

 

 

Best Regards,
Gallen Luo
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

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.