Forum Discussion

jmateu88's avatar
jmateu88
Icon for Helper I rankHelper I
2 years ago
Solved

Filter a dataset and sum the values without considering the duplicates.

Hello, I am trying to get the sum of pending work by the interval selected (week, month) after filtering the dataset and dropping the duplicates, but I am having problems to get it.   The dataset ...
  • Alex87's avatar
    2 years ago

    Hello jmateu88 ,

     

    Is this answering your query? I built in a variable a virtual table where I do not include weeks, and filter on a type (in this case 83), and then performing the sum. 

     

     

    Third_Try = 
    VAR _UniqueRows = 
        SUMMARIZE(
            FILTER(FilteredDataset, FilteredDataset[Type] = 83),
            FilteredDataset[Month],
            FilteredDataset[OT],
            FilteredDataset[op],
            "@TotalCharge", AVERAGE(FilteredDataset[Charge])
        )
    RETURN
        SUMX(_UniqueRows, [@TotalCharge])

     

     

     

    if yes, please mark my reply as the solution. thanks!