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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
deanbland
Helper III
Helper III

Showing new entries in a dataset

Hi, 

 

I have a dataset that looks like this (ignore the 'New Entry?' column, that is the final out put I am wanting): 

 

Risk IDDateNew Entry?
R121/06/2021 
R221/06/2021 
R128/06/2021 
R228/06/2021 
R328/06/20211
R428/06/20211
R105/07/2021 
R205/07/2021 
R505/07/20211

 

I am wanting to count every new entry per week but unsure how to action this. 

 

The data will be represented in a column chart with the X axis representing each week. The data should read 

 

21/06/2021 New Entries = 0

28/06/2021 New Entries = 2 (R3 & R4)

05/07/2021 New Entries = 1 (R5)

 

If further clarification is needed let me know. 

 

Thanks, 

 

Dean

1 ACCEPTED SOLUTION
Fowmy
Super User
Super User

@deanbland 

Use the following measure:

New Entry = 

var __currentweek = SELECTEDVALUE(Table1[Date]) 
var __currentids = VALUES(Table1[Risk ID])
var __pastids = 
    CALCULATETABLE(
        VALUES(Table1[Risk ID]),
        Table1[Date] < __currentweek,
        ALL(table1)
    )
var __newids = 
    COUNTROWS( FILTER( __currentids , not Table1[Risk ID] IN __pastids ) )

return
    IF( NOT(ISEMPTY(__pastids)), __newids )+0

Fowmy_0-1625575566811.png

 



Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

View solution in original post

1 REPLY 1
Fowmy
Super User
Super User

@deanbland 

Use the following measure:

New Entry = 

var __currentweek = SELECTEDVALUE(Table1[Date]) 
var __currentids = VALUES(Table1[Risk ID])
var __pastids = 
    CALCULATETABLE(
        VALUES(Table1[Risk ID]),
        Table1[Date] < __currentweek,
        ALL(table1)
    )
var __newids = 
    COUNTROWS( FILTER( __currentids , not Table1[Risk ID] IN __pastids ) )

return
    IF( NOT(ISEMPTY(__pastids)), __newids )+0

Fowmy_0-1625575566811.png

 



Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.