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
Sara16
Helper III
Helper III

Point in time 12 months ago visualisation that is connected to current date

Hi Community

 

Hoping to gain some help.

 

I have two head count visualisations on a page within a page. One visulisation I have is based on the date slicer (so headcount at relevant point in time fom the slicer). I have another visualisation however I want this to capture the headcount from the previous 12 months (so if a user is looking at July 2022 headcount, the second visualisation will look at headcount as at July 2021). I am hoping to have the second visualation connected to the date slicer so whenever a user selects a date, the second visualisation refers to the count from 12 months prior. 

 

My date field is date heirachy 

6 REPLIES 6
Sara16
Helper III
Helper III

Ignore my commentary - I have fixed the issue 🙂 Thankyou both for your assistance 🙂 

 

Ashish_Mathur
Super User
Super User

Hi,

Try this measure

Headcount in SPLY = calculate([Headcount],sameperiodlastyear(calendar[Date]))

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

This one doesnt tend to work when I am filtering by other dates (slicer)

ryan_mayu
Super User
Super User

@Sara16 

can DATEADD function solve your problem?

=calculate(measure,DATEADD([date],-1,year)





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




what if I am using the date slicer to go back - doesnt tend to work? Nor filtering but another metric (such as a headcount by department) 

i think should work,

 

could  you pls provide the sample data and expected output?





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




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.