Forum Discussion
Dynamic Title for field parameter
- 2 years ago
Hi Deepanshu_46
You can use DAX measure :title =VAR __SelectedValue =SELECTCOLUMNS (SUMMARIZE ( Parameter, Parameter[Parameter], Parameter[Parameter Fields] ),Parameter[Parameter])RETURN "ttitle is ------"& CONCATENATEX ( __SelectedValue, Parameter[Parameter], ", " )Note that this measure should be created in the parameters tableLink for more information :
https://www.sqlbi.com/blog/marco/2022/06/11/using-selectedvalue-with-fields-parameters-in-power-bi/If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly
- Anonymous2 years ago
Hi Deepanshu_46 ,
Here are the steps you can follow:
1. Create calculated column.
Rank_column = RANKX('Table 2','Table 2'[Value1],,ASC)2. Create measure.
Rank_measure = RANKX(ALLSELECTED('Table 2'),CALCULATE(SUM('Table 2'[Rank_column])),,ASC)Measure = var _count=COUNTX(ALLSELECTED('Table 2'),'Table 2'[Value1]) var _Select=SELECTCOLUMNS('Table 2',"tag",'Table 2'[Value1]) var _title1= CONCATENATEX( FILTER(ALL('Table 2'), 'Table 2'[Value1] in _Select),'Table 2'[Value1],"丶") var _rank= RANKX( FILTER( ALLSELECTED('Table 2'),'Table 2'[Value1] in _Select),CALCULATE(MAX('Table 2'[Value1])),,ASC) var _title2= CONCATENATEX( FILTER(ALLSELECTED('Table 2'), [Rank_measure]<=3),'Table 2'[Value1],"丶") return IF( _count>3, _title2&" "&"etc.",_title1)3. Visual -- Format – TiTLE -- FX
4. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi Deepanshu_46 ,
Here are the steps you can follow:
1. Create calculated column.
Rank_column = RANKX('Table 2','Table 2'[Value1],,ASC)
2. Create measure.
Rank_measure =
RANKX(ALLSELECTED('Table 2'),CALCULATE(SUM('Table 2'[Rank_column])),,ASC)Measure =
var _count=COUNTX(ALLSELECTED('Table 2'),'Table 2'[Value1])
var _Select=SELECTCOLUMNS('Table 2',"tag",'Table 2'[Value1])
var _title1=
CONCATENATEX(
FILTER(ALL('Table 2'),
'Table 2'[Value1] in _Select),'Table 2'[Value1],"丶")
var _rank=
RANKX(
FILTER(
ALLSELECTED('Table 2'),'Table 2'[Value1] in _Select),CALCULATE(MAX('Table 2'[Value1])),,ASC)
var _title2=
CONCATENATEX(
FILTER(ALLSELECTED('Table 2'),
[Rank_measure]<=3),'Table 2'[Value1],"丶")
return
IF(
_count>3,
_title2&" "&"etc.",_title1)
3. Visual -- Format – TiTLE -- FX
4. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
- Anonymous2 years agoNot applicable
It works. Thankyou so much for your kind help.