Forum Discussion

LvanLaar's avatar
LvanLaar
Frequent Visitor
3 years ago
Solved

Count where count > 1 based on grouping

I have been asked to do an analysis on orders with multiple shipments/colli. Below a screenshot of a matrix visual with order number. A count of tracking codes and a sum of colli.   I would like t...
  • FreemanZ's avatar
    3 years ago

    hi LvanLaar 

    Try plot with the OrderNumber column and a measure like:

    count of Track and Trace =

    VAR _count = COUNTROWS(TableName)

    RETURN

    IF(_count=1, BLANK(), _count)

     

    for the total card visual, try like:

    1PlusCountTotal = 

    VAR _table =

    ADDCOLUMNS(

        VALUES(TableName[OrderNumber]),

        "Count",

      CALCULATE(COUNTROWS(TableName))

    )

    RETURN

    COUNTROWS(

       FILTER(

           _table,

           [Count]>1

       )

    )