Forum Discussion

sunah132's avatar
sunah132
Helper I
5 years ago
Solved

Minimum value subtotal based on specific dates

Hi,

 

I'm trying to add subtotal with the minimum value and the subtotal is also taking a minimum of the total price.

If I want to apply value as a minimum and sum up them into the subtotal, what would be a good way?

Thank you in advance.

 

item5/1/20215/2/20215/3/2021TotalExpected
1100100100100300
2150150150150450
3200200200200600

 

In this one, the total should be 912.8 as expected.

Thank you.

  • Hi, sunah132 

    Thank you for sharing.

    Please try the below.

     

     

    Min Value measure =
    SWITCH (
    TRUE (),
    ISINSCOPE ( 'Table'[item] ), SUMX ( VALUES ( 'Table'[Date] ), MIN ( 'Table'[Value] ) ),
    SUM ( 'Table'[Value] )
    )

     

     

    Hi, My name is Jihwan Kim.

     

    If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.

     

    Linkedin: linkedin.com/in/jihwankim1975/

    Twitter: twitter.com/Jihwan_JHKIM

10 Replies

  • Hi, sunah132 

    Please try something like below.

     

    Min Value measure =
    SUMX ( VALUES ( 'Table'[Date] ), MIN ( 'Table'[Value] ) )

     

     

    Hi, My name is Jihwan Kim.

     

    If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.

     

    Linkedin: linkedin.com/in/jihwankim1975/

    Twitter: twitter.com/Jihwan_JHKIM

    • sunah132's avatar
      sunah132
      Helper I

      Thank you so much!

      That measure applied on my report successfully.

      If I would like to calculate row subtotal, would it be using same as this Min Value measure =
      SUMX ( VALUES ( 'Table'[Date] ), MIN ( 'Table'[Value] of drill up value ) ) ?

      • Jihwan_Kim's avatar
        Jihwan_Kim
        Super User

        Hi, sunah132 

        Thank you for your feedback.

        Sorry that I quite do not understand your last question.

        Please describe how you like to see the row subtotal.