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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
TomLU123
Helper III
Helper III

[Seek Help] How to calculate the value difference between the max date and the previous date?

Hi Expert, 

 

We are developing report to show the week headcount trend. The data is refreshed on a weekly basis. And the [Headcount Changes compared to last week] is one of the indicators we are tracking. Therefore, we wish to just compare the headcount difference between ①the Max Effective Date user choose in slicer and ②the previous Effective Date of Max Effective date. It may not be necessary the Min of the date chose in the slicer.

 

Example as below:

Effective DateEmployee
1/1/2019A
1/1/2019B
1/1/2019C
1/1/2019D
1/1/2019E
3/18/2019A
3/18/2019B
3/18/2019C
3/18/2019D
3/18/2019E
3/18/2019F
3/25/2019A
3/25/2019B
3/25/2019C
3/25/2019D
3/25/2019E
3/25/2019F
3/25/2019G
3/25/2019H

 

For example,

On 3/4/2019, the headcount is 5.

On 3/11/2019, the headcount is 6.

On 3/18/2019, the headcount is 8

 

If the user choose 3/4/2019 to 3/11/2019, the [Headcount Changes compared to last week] is 6-5=1

If the user choose 3/11/2019 to 3/18/2019, the [Headcount Changes compared to last week] is 8-6=2

If the user choose 3/4/2019 to 3/18/2019, the[Headcount Changes compared to last week] is 8-6=2 (instead of 8-5=3)

 

Is it possible to achieve that by using DAX?

 

Thank you so much!

 

Best regards,

Tom

1 REPLY 1
v-yuta-msft
Community Support
Community Support

@TomLU123 ,

 

"

On 3/4/2019, the headcount is 5.

On 3/11/2019, the headcount is 6.

"

Still not very clear about this logic, could clarify more details about why headcount before 3/4 is different from headcount from 3/11?

 

Community Support Team _ Jimmy Tao

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

 

Helpful resources

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

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

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