Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
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:
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
@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
Hi @amitchandak , thank you, but I am trying to create a Card to display the title, and they change dynamically based on the slicer.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
25 | |
12 | |
9 | |
9 | |
9 |
User | Count |
---|---|
21 | |
14 | |
14 | |
13 | |
13 |