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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
BaldAccountant
Helper II
Helper II

Title with quarter or month but not both

I have a page with a visual with separate slicers for month, quarter and year.

 

I am trying to make a title on a card so that title that says "Quarter 2 2023" Or "April 2023".

I tried to use the following measure:

Title1 = "Report Name "&Unichar(10)&selected[selected quarter]&selected[selected month]&" "&selected[selected year]

If I choose April but no quarter it says "Qtr 2April 2023"  It is OK if I just choose quarter, not month.

Is there a way I can either change my title measure to ignore the quarter if the month is chosen or better yet have a single slicer to choose either the month or quarter?

1 ACCEPTED SOLUTION
vicky_
Super User
Super User

Maybe you can consider something like:

Title1 = 
var selectedQuarterOrMonth = SELECTEDVALUE(Table[Month], SELECTEDVALUE([Quarter]))
"Report Name " &Unichar(10)& selectedQuarterOrMonth & " " & selected[selected year]

The idea behind this is that selectedvalue will only return a value if there's only 1 value. Since each quarter has more than a month, then the selectedvalue will return the quarter value as an alternative result if a quarter is selected, rather than a single month.

View solution in original post

2 REPLIES 2
BaldAccountant
Helper II
Helper II

I had to use return to make it work, but it worked.

 

vicky_
Super User
Super User

Maybe you can consider something like:

Title1 = 
var selectedQuarterOrMonth = SELECTEDVALUE(Table[Month], SELECTEDVALUE([Quarter]))
"Report Name " &Unichar(10)& selectedQuarterOrMonth & " " & selected[selected year]

The idea behind this is that selectedvalue will only return a value if there's only 1 value. Since each quarter has more than a month, then the selectedvalue will return the quarter value as an alternative result if a quarter is selected, rather than a single month.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.