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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
paolomint
Helper III
Helper III

Dynamic title from multiple selections of the same slicer

Hi everyone,

 

My model has 2 filters on all pages: a QUARTER slicer and a YEAR slicer

I need to write a meansure (to use as a TITLE for several pages) to obtain the following results:

 

ACTIONRESULT OF THE MEASURE
NO QUARTER selection  - YEAR SELECTION = 2020REFERENCE PERIOD: 2020 
ONE QUARTER selection (Q1) - YEAR = 2020REFERENCE PERIOD: 2020 - Q1
TWO QUARTER selections (Q1/Q2) - YEAR = 2020 REFERENCE PERIOD: 2020 - Q1/Q2
THREE QUARTER selections (Q1/Q2/Q3) - YEAR = 2020REFERENCE PERIOD: 2020 - Q1/Q2/Q3
FOUR QUARTER selections (Q1/Q2/Q3/Q4) - YEAR = 2020REFERENCE PERIOD: 2020 

  

I hope someone can help me

thanks for your attention

bye

Paolo 

 

 

 

1 ACCEPTED SOLUTION
v-eachen-msft
Community Support
Community Support

Hi @paolomint ,

 

You could use ISFILTERED() and ALLSELECTED() to get slicer status. Here is my result.

1-1.PNG

Here is my test file for your reference.

 

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

View solution in original post

4 REPLIES 4
v-eachen-msft
Community Support
Community Support

Hi @paolomint ,

 

You could use ISFILTERED() and ALLSELECTED() to get slicer status. Here is my result.

1-1.PNG

Here is my test file for your reference.

 

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

Hi @v-eachen-msft 

thank you very much, love your solution

I put it in my model, it works but I see a strange things, never seen before.

 

The result of the measure is 2020 when quarter are selected (eg 2020 - Q1/Q2) but is 2,020.00 when quarter are not selected.

As you can see on the picture, I can't change the data type (TESTO = TEXT) or the format. 

What's happened in your opinion?

Thanks for your support

20200804_155512.jpg

 

amitchandak
Super User
Super User

@paolomint , Are trying YTD ?

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"))
This year Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(ENDOFYEAR('Date'[Date]),"12/31"))
Last year Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(ENDOFYEAR(dateadd('Date'[Date],-1,Year)),"12/31"))
Last to last YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(dateadd('Date'[Date],-2,Year),"12/31"))
Year behind Sales = CALCULATE(SUM(Sales[Sales Amount]),dateadd('Date'[Date],-1,Year))

 

To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :
https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions
https://www.archerpoint.com/blog/Posts/creating-date-table-power-bi
https://www.sqlbi.com/articles/creating-a-simple-date-table-in-dax/

See if my webinar on Time Intelligence can help: https://community.powerbi.com/t5/Webinars-and-Video-Gallery/PowerBI-Time-Intelligence-Calendar-WTD-Y...


Appreciate your Kudos.

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
Greg_Deckler
Community Champion
Community Champion

@paolomint - See if this helps: https://community.powerbi.com/t5/Quick-Measures-Gallery/The-Most-Amazing-Mind-Blowing-Dynamic-Slicer...



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors