cancel
Showing results 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

Resolver I

Measure for showing lowest cost/week this is in

Hi all,

I have the following data table:

 Group Code Stock Cost Date A REJI3 Apple 21401 07/01/22 A FDJDA2 Banana 500 07/01/22 B EFAF3 Shoes 42594 14/01/22 B DSKOAJ T-Shirt 224 14/01/22 B DSJSIS Trouser 24121 14/01/22 A REJI3 Apple 53151 14/01/22 A FDJDA2 Banana 200 14/01/22 C SDAIDJA Beer 4214 14/01/22 C DSLA2 Wine 886 21/03/22 C DSJIJIJ5 Rum 454 21/03/22 D SOOO2 Dog 5332 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.

 Group Code Stock Cost Date A REJI3 Apple 21401 07/01/22 A FDJDA2 Banana 500 07/01/22

1 ACCEPTED SOLUTION
Community Support

Hi  @TotunG ,

(1) Create a new measure

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

(2)Apply filtering

(3)Final output

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.

Community Support

Hi  @TotunG ,

(1) Create a new measure

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

(2)Apply filtering

(3)Final output

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.

Announcements

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 Monthly Update - June 2024

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

New forum boards available in Real-Time Intelligence.

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

Top Solution Authors
Top Kudoed Authors