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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
lherbert501
Post Partisan
Post Partisan

Dynamic Title Field Parameter

Hi,

 

I have my measure below which it accepts the dax okay.

 

TESTDynamicTitle =
VAR a =
    CALCULATE ( DISTINCTCOUNT ( DimDate[Month] ), ALLSELECTED ( DimDate[Month] ) )
VAR b =
    CALCULATE ( DISTINCTCOUNT ( DimDate[Month] ), ALL ( DimDate[Month] ) )
return

  "" &
  CONCATENATEX (
        VALUES ( 'Parameter'[Parameter] ),
       'Parameter'[Parameter],
        " ,")
    & " Sales for " & IF( a = b, FIRSTNONBLANK(DimDate[YearNumCal],1), FIRSTNONBLANK(DimDate[Month],1 ))
 
 
But when I put it into the dynamic title I get the below error. 
I've looked into Using SELECTEDVALUE with Fields Parameters in Power BI - SQLBI which looks similar, but I cant seem to get it to like the dax. Is there an alternative method?
 
Thankyou
 
lherbert501_0-1677229413932.png

 

 
 
 
1 ACCEPTED SOLUTION
OwenAuger
Super User
Super User

Hi @lherbert501 

The easiest fix would be to change

 

CONCATENATEX (
    VALUES ( 'Parameter'[Parameter] ),
    ...

 

into

 

CONCATENATEX (
    'Parameter',
    ...

 

Since there should be no duplicates in the 'Parameter'[Parameter] column, the result should be as intended.

 

Passing a field parameter column reference to VALUES suffers from the same underlying problem as passing one to SELECTEDVALUE.

 

Regards


Owen Auger
Did I answer your question? Mark my post as a solution!
Blog
LinkedIn

View solution in original post

3 REPLIES 3
kaisrec
Advocate I
Advocate I

@lherbert501 , is it possible to apply the same logic to column header?
Use a Function in Field Parameters Header - Microsoft Fabric Community

OwenAuger
Super User
Super User

Hi @lherbert501 

The easiest fix would be to change

 

CONCATENATEX (
    VALUES ( 'Parameter'[Parameter] ),
    ...

 

into

 

CONCATENATEX (
    'Parameter',
    ...

 

Since there should be no duplicates in the 'Parameter'[Parameter] column, the result should be as intended.

 

Passing a field parameter column reference to VALUES suffers from the same underlying problem as passing one to SELECTEDVALUE.

 

Regards


Owen Auger
Did I answer your question? Mark my post as a solution!
Blog
LinkedIn

Thankyou @OwenAuger 

 

It seems so simple now I see it! 😀

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 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.