Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.
Hi,
Here's a tricky measure to do, on my client demand.
I have 2 sheets. On each, I have a bar chart with years on absissa.
By default, a text has to appear somewhere saying that years selected are ">= 2020"
If users select one or several years on the bar chart, it has to concatenate the years separated by a comma ("in 2021, 2022" for example)
When do I know that nothing is selected on the bar chart ?
When I use SELECTEDVALUE, it is BLANK() when nothing is selected AND when two or more years are selected.
any others options to detect it ?
Here's my attempt which returns ">=2020" when 2 or more years are selected
Sélection Année =
var concatYEARS = CONCATENATEX ( VALUES ( '#PERIODE_DBT_TVX'[Valeur_lib]), [Valeur_lib], ",")
var selection = SELECTEDVALUE('#PERIODE_DBT_TVX'[Valeur_lib])
return
--attempt 1
SWITCH(TRUE(),
selection = blank(),">= 2020",
"in " & concatYEARS)
Thanks a lot !
Solved! Go to Solution.
Hi @Anonymous
Use ISFILTERED( ) on the column in the slicer. It will only be false when nothing is selected
Please mark the question solved when done and consider giving a thumbs up if posts are helpful.
Contact me privately for support with any larger-scale BI needs, tutoring, etc.
Cheers
Thanks @AlB you rock !
For those who might be interested in, here's how I finished my measure.
Sélection Année =
var concatYEARS = CONCATENATEX ( VALUES ( '#PERIODE_DBT_TVX'[Valeur_lib]), [Valeur_lib], ",")
return
SWITCH(TRUE(),
ISFILTERED('#PERIODE_DBT_TVX'[Valeur_lib]) = FALSE(),">= 2020",
ISFILTERED('#PERIODE_DBT_TVX'[Valeur_lib]), "en " & concatYEARS)
Hi @Anonymous
Use ISFILTERED( ) on the column in the slicer. It will only be false when nothing is selected
Please mark the question solved when done and consider giving a thumbs up if posts are helpful.
Contact me privately for support with any larger-scale BI needs, tutoring, etc.
Cheers
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 8 | |
| 6 | |
| 3 | |
| 3 | |
| 3 |
| User | Count |
|---|---|
| 11 | |
| 9 | |
| 8 | |
| 7 | |
| 6 |