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

Preparing for a certification exam? Ask exam experts all your questions on May 15th. Register now.

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
PBIApril_Carousel

Power BI Monthly Update - April 2025

Check out the April 2025 Power BI update to learn about new features.

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

Find out what's new and trending in the Fabric community.