Forum Discussion

TheBaz_57's avatar
TheBaz_57
Frequent Visitor
2 years ago
Solved

Find the date a min value occured.

Hi there,

 

I perused the forum but could find what I'm looking at.

 

I have this data:

NameQtyDate
Peter1001/04/2024
Tom230/03/2024
Sam515/03/2024
Peter602/01/2024
Tom814/03/2024
Sam4027/02/2024

 

So I have in pbi a matrix with 

Rows: Name

Values: Min of Qty

 

But I would like to get as well the date the Min Qty occured. And I have no idea how to gt that. Tried different solutions but without sucess.

 

NameMin QtyDate
Peter602/01/2024
Tom230/03/2024
Sam5

15/03/2024

 

Thanks for the help ðŸ˜‰

 

  • TheBaz_57 ,

    try this measure,

    Min date = 
    VAR _minQty = MIN('Table 1'[Qty])
    VAR _minDate = CALCULATE(
        MIN('Table 1'[Date]),'Table 1'[Qty] = _minQty)
    RETURN _minDate

     

2 Replies

  • Arul's avatar
    Arul
    Icon for Super User rankSuper User

    TheBaz_57 ,

    try this measure,

    Min date = 
    VAR _minQty = MIN('Table 1'[Qty])
    VAR _minDate = CALCULATE(
        MIN('Table 1'[Date]),'Table 1'[Qty] = _minQty)
    RETURN _minDate