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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
Anonymous
Not applicable

Dynamic Title Card to show previous year of selected value

Hello Community, 

 

I am trying to create Title Cards that are dynamic for my YoY comparison dashboard. I have managed to get it to work for the Selected Year, as seen below, using the following DAX: 

 

Selected Year = SELECTEDVALUE('Date Table'[Fiscal Year], "All Years")
CY Title = COMBINEVALUES(" ", "Emergencies in "&[Selected Year], "for "&[Selected Quarter])

 

Card.PNG

 

For the second card, the one below where it says "Emergencies LY", I would like to create a title card that says "Emergencies in FY015 (dynamic) for All Quarters (dynamic)", I would like it to show the SAMEPERIODLASTYEAR for the Selected Year. However, if nothing is selected, I would like to show the text "All Years". Is this possible? 

 

Thank you for the help, 

 

Denisse

2 REPLIES 2
amitchandak
Super User
Super User

@Anonymous , You can use YTD like

 

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

 

 

or we can year behind measure

 

Year behind Sales = CALCULATE(SUM(Sales[Sales Amount]),dateadd('Date'[Date],-1,Year))
Year behind Sales = CALCULATE(SUM(Sales[Sales Amount]),SAMEPERIODLASTYEAR('Date'[Date]))

 

 

make sure you use date table

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Hi @amitchandak , thank you, but I am trying to create a Card to display the title, and they change dynamically based on the slicer. 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.