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
Anonymous
Not applicable

Dynamic measure to display results for current year and previous 2 years

Hi, 

I have a measure which works fine but I want it to display the results dynamically for current year and last 2 years instead of me manually selecting the years 

Is it possible?

 

Heres my current measure:

 

1. DistinctAccount = DISTINCTCOUNT('AccountTable'[AccountId])

 

2. AccountMembers= CALCULATE(
[DistinctAccount],
FILTER(
ALLSELECTED('Calendar'[Date]),
('Calendar'[Date] <= MAX('Calendar'[Date]) 
))
,FILTER(ALLSELECTED(Id_Table[Termination Year]),(Id_Table[Termination Year]>SELECTEDVALUE('Calendar'[Year])))

Please let me know

 

Thanks

1 REPLY 1
v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @Anonymous,


I have a measure which works fine but I want it to display the results dynamically for current year and last 2 years instead of me manually selecting the years 

 


I'm not very clear about your requirement "display the results dynamically for current year and last 2 years instead of me manually selecting the years ".

 

Do you want your measure will show the value without selecting date in slicer?

 

If it is convenient, could you share some data sample and your desired output so that we could understand your scenario better and get the solution more quickly.

 

Best  Regards,

Cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.