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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! 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
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.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.