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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

Check out the June 2024 Power BI update to learn about new features.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.