Forum Discussion
Filter a dataset and sum the values without considering the duplicates.
- 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!
Hello Alex87 and I am sorry if I did not explain well the issue.
I see that the solution if we check the graph is totally valid. I am sorry for not checking it.
However, the solution does not suits if we see the result in the table as long as more months in the table for the same orders, it will increase the charge of them (this will not happen in the first try after being modified).
I attach the photo to make it easier. Since there are two months, the charges doubles
Anyway, I obtained the solution so I close this issue.
Thank you very much for the reply Alex.