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 chart title to be filtered by Filter pane and slicer

Hi everyone,

 

I have a measure to display dynamic title. This measure is restricted to show the range based on the condition in Filters pane. When I select Fiscal Period = 2021, the measure supposed to show "Total units from Sep'2021 to Dec'2021" but I'm not sure how I can achieve that. Does anyone know how to improve on the measure?

 

Measure = 

VAR startMth = CALCULATE([(Slct) Year_Month_Short],FILTER(Dim_Date,Dim_Date[CurMonthOffset]=0))
VAR endMth = CALCULATE([(Slct) Year_Month_Short],FILTER(Dim_Date,Dim_Date[CurMonthOffset]=8))
return
"Total units from " & startMth & " to " & endMth
 

 

When Fiscal Period = All

beekee_0-1630902068475.png

 

When Fiscal Year = 2021

beekee_1-1630902104988.png

 

 

Regards,

BK

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , if your fiscal year start from Sep and end at Aug.

 

You can use datesytd with date table 

examples

 

YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD('Date'[Date],"8/31"))
Last YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(dateadd('Date'[Date],-1,Year),"8/31"))

 

refer if needed

Creating Financial Calendar - From Any Month
https://community.powerbi.com/t5/Community-Blog/Creating-Financial-Calendar-Decoding-Date-and-Calendar-1-5-Power/ba-p/1187441

 

Power BI — Year on Year with or Without Time Intelligence
https://medium.com/@amitchandak.1978/power-bi-ytd-questions-time-intelligence-1-5-e3174b39f38a
https://www.youtube.com/watch?v=km41KfM_0uA

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@Anonymous , if your fiscal year start from Sep and end at Aug.

 

You can use datesytd with date table 

examples

 

YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD('Date'[Date],"8/31"))
Last YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(dateadd('Date'[Date],-1,Year),"8/31"))

 

refer if needed

Creating Financial Calendar - From Any Month
https://community.powerbi.com/t5/Community-Blog/Creating-Financial-Calendar-Decoding-Date-and-Calendar-1-5-Power/ba-p/1187441

 

Power BI — Year on Year with or Without Time Intelligence
https://medium.com/@amitchandak.1978/power-bi-ytd-questions-time-intelligence-1-5-e3174b39f38a
https://www.youtube.com/watch?v=km41KfM_0uA

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.