TL;DR: Copy this code into your DAX formatter.
Selected Program = VAR _program = IF ( ISFILTERED ( ‘db_datareader uvw_aca_wipInfoPrior12Buckets'[program] ), IF ( HASONEFILTER ( ‘db_datareader uvw_aca_wipInfoPrior12Buckets'[program] ), IF ( ISBLANK ( SELECTEDVALUE ( ‘db_datareader uvw_aca_wipInfoPrior12Buckets'[program] ) ), “Unspecified programs”, COMBINEVALUES ( ” “, “the”, SELECTEDVALUE ( ‘db_datareader uvw_aca_wipInfoPrior12Buckets'[program] ), “program” ) ), “Multiple programs” ), “All programs” )RETURN _program
Inspired by #GuyInACube’s video @ https://www.youtube.com/watch?v=XXv13mkjV2Y
Display a dynamic PowerBI report title based on filters and/or slicers. If one value is selected, it displays in the title. If multiple values are selected, the title says so. If all values are selected, the title says so. If unspecified values are selected, the title says so.
Report Title goes on a card visual, and looks like this:
Report Title = COMBINEVALUES ( " ", "Production Yield for", [Selected Program], "at", [Selected Step], "#", [Selected Pass] )
Selected Program, for example, looks like this:
Selected Program = VAR _program =
IF (
ISFILTERED ( 'db_datareader uvw_aca_wipInfoPrior12Buckets'[program] ),
IF (
HASONEFILTER ( 'db_datareader uvw_aca_wipInfoPrior12Buckets'[program] ),
IF (
ISBLANK ( SELECTEDVALUE ( 'db_datareader uvw_aca_wipInfoPrior12Buckets'[program] )
),
"Unspecified programs",
COMBINEVALUES (
" ",
"the",
SELECTEDVALUE ( 'db_datareader uvw_aca_wipInfoPrior12Buckets'[program] ),
"program"
)
),
"Multiple programs"
),
"All programs"
)
RETURN
_program