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

A new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.

Reply
Anonymous
Not applicable

tracking changes by date column

Hi all, Appologies for asking this question again but im struggling to visualise some of the prior examples. 

 

I have a weekly snapshot of data pulled from our system as per below.

 

WCIDAllocation DateComplete DateCancelled DateAppointment Date
20/12/2021     
27/12/2021 1    
03/01/2022 104/01/2022   
10/01/2022 104/01/2022  08/02/2022
17/01/2022 104/01/2022  08/02/2022
24/01/2022 104/01/2022 30/01/202208/02/2022
31/01/2022 104/01/2022 30/01/202208/02/2022
31/01/2022 2    

 

i am trying to find a way to count changes over each week. ie:

 

WCNewAllocated CountCompleted CountCancelled CountAppointment booked Count
20/12/2021 0 0000
27/12/2021 10000
03/01/2022 01000
10/01/2022 00001
17/01/2022 00000
24/01/2022 00010
31/01/2022 10000

 

I assume these will need to be done over a number of calculated columns, but if anyone can help with even 1 example for one columm. i can probably replicate it through the rest.

 

any help would be extreemly welcomed.

 

Thanks loads

1 ACCEPTED SOLUTION
v-angzheng-msft
Community Support
Community Support

Hi, @Anonymous 

Try this:

Allocated Count = 
var _t=SUMMARIZE(ALL('Table'),[Allocation Date],[WC])
var _addRank=ADDCOLUMNS(_t,"_rank",RANKX(FILTER(_t,[Allocation Date]=EARLIER([Allocation Date])),[WC],,ASC))

var _thisDate=MINX('Table',[Allocation Date])
var _that_WC=MINX(FILTER(_addRank,[Allocation Date]=_thisDate&&[_rank]=1),[WC])
var _if=IF(_thisDate=BLANK(),0,
IF(MAX('Table'[WC])=_that_WC,1,0))

return _if


Result:

vangzhengmsft_0-1645075684344.png

Please refer to the attachment below for details.

Hope this helps.

 

 

Best Regards,
Community Support Team _ Zeon Zheng


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

thanks very much 🙂

 

v-angzheng-msft
Community Support
Community Support

Hi, @Anonymous 

Try this:

Allocated Count = 
var _t=SUMMARIZE(ALL('Table'),[Allocation Date],[WC])
var _addRank=ADDCOLUMNS(_t,"_rank",RANKX(FILTER(_t,[Allocation Date]=EARLIER([Allocation Date])),[WC],,ASC))

var _thisDate=MINX('Table',[Allocation Date])
var _that_WC=MINX(FILTER(_addRank,[Allocation Date]=_thisDate&&[_rank]=1),[WC])
var _if=IF(_thisDate=BLANK(),0,
IF(MAX('Table'[WC])=_that_WC,1,0))

return _if


Result:

vangzhengmsft_0-1645075684344.png

Please refer to the attachment below for details.

Hope this helps.

 

 

Best Regards,
Community Support Team _ Zeon Zheng


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

lbendlin
Super User
Super User

You can do this by unpivoting your data (which will also save you some memory). Please explain the reasoning behind the "New" column - what is the expected number range?  Please provide some more sample data that shows what happens after 31/01/2022.

Helpful resources

Announcements
May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors