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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
HansZuijd
Regular Visitor

Merge multiple selected slicer items in a string

Hi,

i've created the below slicer and want to display the selected items on a card. the output should look something like "2017 (Q3, Q4), 2018, 2019, 2020 (Q1)"
HansZuijd_0-1666019668190.png

any ideas on how to realise this?

kind regards, 

Hans

 

1 ACCEPTED SOLUTION
johnt75
Super User
Super User

Try

Selected Quarters
VAR SummaryTable =
	SUMMARIZE( 'Date', 'Date'[Year], 'Date'[Quarter] )
Var Txt = CONCATENATEX( VALUES('Date'[Year]),
	VAR Yr = 'Date'[Year]
	VAR Qrs = CONCATENATEX(
		FILTER( SummaryTable, 'Date'[Year] = Yr),
		'Date'[Quarter],
		", "
	)
	RETURN Yr & " ( " & Qrs & ")",
	", "
)
RETURN Txt 

View solution in original post

2 REPLIES 2
johnt75
Super User
Super User

Try

Selected Quarters
VAR SummaryTable =
	SUMMARIZE( 'Date', 'Date'[Year], 'Date'[Quarter] )
Var Txt = CONCATENATEX( VALUES('Date'[Year]),
	VAR Yr = 'Date'[Year]
	VAR Qrs = CONCATENATEX(
		FILTER( SummaryTable, 'Date'[Year] = Yr),
		'Date'[Quarter],
		", "
	)
	RETURN Yr & " ( " & Qrs & ")",
	", "
)
RETURN Txt 
amitchandak
Super User
Super User

@HansZuijd , Not exact the same but you can try something like this example

 

concatenatex(Date, Date[Quarter] & "-" Date[Year], " , " )

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.

Top Solution Authors