Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

How to avoid duplicated rows?

Prequil - Do not ask for data, I cannot give it. If you need it to be helpful, scroll on to another question as I can do without the rude comments I often receive when requesting help from this group...
  • vanessafvg's avatar
    3 years ago

    Hi there ok so without data im just gonna wing it but i think what you need to do is;

     

    create a measure on your date ie

    last appointment = max(last apt)

    then replace this  measure with the date on your matrix

    change your other measures to 

    change both your  

    Allowed Units =
    VAR maxdte =
    MAX ( [last apt] )
    RETURN
    CALCULATE (
    MAX ( MERGE_BillingSUMMARY[*C-Allowed] ),
    FILTER ( 'table'[last apt], 'table'[last apt] = maxdte )
    )

     

    Applied Units =
    VAR maxdte =
    MAX ( [last apt] )
    RETURN
    CALCULATE (
    SUM ( MERGE_BillingSUMMARY[Units] ),
    FILTER (
    MERGE_BillingSUMMARY,
    MERGE_BillingSUMMARY[CPT Code]
    IN {
    "90791",
    "90832",
    "90834",
    "90837",
    "90839",
    "90840",
    "90846",
    "90847",
    "90853"
    }
    ),
    FILTER ( 'table'[last apt], 'table'[last apt] = maxdte )
    )