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
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
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.

Top Solution Authors