Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
fsantos
Regular 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 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:

 

2020-07-28 14_30_45-Window.png

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Rgs,

 

Fabio

2 ACCEPTED SOLUTIONS
amitchandak
Super User
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/

View solution in original post

I using o SUMX with DISTINCT.

 

SUM VALUE = SUMX(DISTINCT(Planilha1[Sales Order]),FIRSTNONBLANK(Planilha1[Value],0))
 
Rgs,
 
Fabio

View solution in original post

2 REPLIES 2
amitchandak
Super User
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/

I using o SUMX with DISTINCT.

 

SUM VALUE = SUMX(DISTINCT(Planilha1[Sales Order]),FIRSTNONBLANK(Planilha1[Value],0))
 
Rgs,
 
Fabio

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.