Forum Discussion

Ttaylor9870's avatar
Ttaylor9870
Helper III
3 years ago
Solved

Assigning Values based on conditions

Hi All,   I am looking to reassign a value based on specific conditions, here is my table below...   Name Amount Delivery Day A 1 Blank A 2 Day 1 A 1 Day 1 A 5 Day 2 B...
  • FreemanZ's avatar
    FreemanZ
    3 years ago

    hi Ttaylor9870 

    try to plot a table visual with Name column and two measures like:

    AmountSum = SUM(TableName[Amount])
    
    MaxDeliveryDate = 
    MINX(
        FILTER(
            TableName, 
            TableName[Amount]=MAX(TableName[Amount])
        ),
        TableName[Delivery Day]
    )

     

    it worked like:

  • Ttaylor9870's avatar
    Ttaylor9870
    3 years ago

    Hi FreemanZ,

     

    How would this then look if you were to change it to No of rows opposed to Amount?

    NameAmountDelivery Day
    A1Blank
    A2Day 1
    A1Day 1
    A5Day 2
    B4Day5
    B5Blank
    B8Day 2
    B12Day2
    C7Day 3
    C8Day 1
    C17Day5
    C1Day 1

     

    CompanyAmountDelivery Day
    A9Day 1
    B29Day 2
    C33Day 1