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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. 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
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

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.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.