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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. 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
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

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.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.

March Power BI Update Carousel

Power BI Community Update - March 2026

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