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
Dan2027
Regular Visitor

Unique count of text where values display in new column

I have thousands of shipment numbers and sales documents. These numbers appear on multiple report pulls. I have cerated a date for each report pull and concatenated that date with the sales document. I want to return 1 where a unique value appears for the first time and a 0 for all other occurances. In excel i believe the forumla functions like this:

=IF(ISNA(VLOOKUP(A2,$A$1:A1,1,)),1,0)

 

Any help is appreciated.

 

Using the group by function will not fit my purposes.

 

Kind Regards,

Daniel

2 REPLIES 2
v-sihou-msft
Employee
Employee

@Dan2027

 

I assume the first occurance of "Sales Document + Shipment" should be with min date. You just need to compare the current row date with this min date.

 

Column = 
var FirstOccuranceDate= CALCULATE(MIN(Table1[Date]),ALLEXCEPT(Table1,Table1[Ship],Table1[SalesDocument]))
return
IF(Table1[Date]=FirstOccuranceDate,1,0)

455.PNG

 

 

Regards,

Capture.PNG

 

Simon,

 

I see where your going with this but i am still struggling to understand. Lets stick to just a count of sales document and date for now and ignore the shipment document. i need to count these sales documents every time they appear on the report but not multiple times per day.

 

Kind Regards,

Daniel

 

 

 

 

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.