Forum Discussion
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 sales forecast, if I select the date, it has to appear, if I do not filter anything, I wanted it to show the sales order only once (select distinct).
Example:
Rgs,
Fabio
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/
I using o SUMX with DISTINCT.
SUM VALUE = SUMX(DISTINCT(Planilha1[Sales Order]),FIRSTNONBLANK(Planilha1[Value],0))Rgs,Fabio
2 Replies
- amitchandak
Super User
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/
- fsantosRegular Visitor
I using o SUMX with DISTINCT.
SUM VALUE = SUMX(DISTINCT(Planilha1[Sales Order]),FIRSTNONBLANK(Planilha1[Value],0))Rgs,Fabio