Forum Discussion
fsantos
6 years agoRegular Visitor
Result filter distinct value with field
Hi experts, How do I when a date filter is not used, it makes a distinct selection based on a field ?? I have the case that the sales order has two dates, one for opportunity and the other for...
- 6 years ago
fsantos , you can use is filtered to check if data is filtered or not.
if it is not filtered
the use the measure for value
lastnonblankvalue(Table[Date], sum(Table[Value]))
else use sum(Table[Value])
refer
https://powerpivotpro.com/2013/03/hasonevalue-vs-isfiltered-vs-hasonefilter/
- 6 years ago
I using o SUMX with DISTINCT.
SUM VALUE = SUMX(DISTINCT(Planilha1[Sales Order]),FIRSTNONBLANK(Planilha1[Value],0))Rgs,Fabio
amitchandak
Super User
6 years agofsantos , you can use is filtered to check if data is filtered or not.
if it is not filtered
the use the measure for value
lastnonblankvalue(Table[Date], sum(Table[Value]))
else use sum(Table[Value])
refer
https://powerpivotpro.com/2013/03/hasonevalue-vs-isfiltered-vs-hasonefilter/
- fsantos6 years agoRegular Visitor
I using o SUMX with DISTINCT.
SUM VALUE = SUMX(DISTINCT(Planilha1[Sales Order]),FIRSTNONBLANK(Planilha1[Value],0))Rgs,Fabio