Join 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!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Hi Team,
I have Slicer for Month-Year (Column name as select month). and have created Matrix table for 12 Months where will see sum of searches of last 12months from latest month. Now I need to see dynamic column based on selection of slicer.
Incase in slicer I have selected "October 2021"; column name should appear as " 12M (Jan 21 - Oct 21) {bold part should be dynamic}
For 12Months my calculation is:
Please suggest best suitable way to get dynamic column.
Solved! Go to Solution.
Hi @SK87 ,
If you want your field name to be displayed dynamically based on the slicer options, I'm afraid it can't be achieved... Maybe you could consider creating a measure as below and putting it on the card visual to display the field name info...
measure =
VAR _selmonth =
SELECTEDVALUE ( 'Brands Final'[Select Month] )
RETURN
"12M (" & [the month for 10 months ago] & " - " & _selmonth & ")"
Best Regards
@SK87 ,
If you choose one month and what show more than that data on axis, ou need independent date table in slicer
example measure
//Date1 is independent Date table, Date is joined with Table
new measure =
var _max = maxx(allselected(Date1),Date1[Date])
var _min = eomonth(_max, -12) +1
return
calculate( sum(Table[Value]), filter('Date', 'Date'[Date] >=_min && 'Date'[Date] <=_max))
Need of an Independent Date Table:https://www.youtube.com/watch?v=44fGGmg9fHI
You can also use
Year behind Sales = CALCULATE(SUM(Sales[Sales Amount]),dateadd('Date'[Date],-1,Year))
Year behind Sales = CALCULATE(SUM(Sales[Sales Amount]),SAMEPERIODLASTYEAR('Date'[Date]))
Thanks for your response but I am looking for dynamic column name; calculation Part of 12Months already done at my end.
Need Name as "12M (Jan 21 - Oct 21) " on selection of slicer "October 2021
If I select July 2021 it should be "12M (Oct 20 - Jul 21)
Hi @SK87 ,
If you want your field name to be displayed dynamically based on the slicer options, I'm afraid it can't be achieved... Maybe you could consider creating a measure as below and putting it on the card visual to display the field name info...
measure =
VAR _selmonth =
SELECTEDVALUE ( 'Brands Final'[Select Month] )
RETURN
"12M (" & [the month for 10 months ago] & " - " & _selmonth & ")"
Best Regards
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 |
---|---|
12 | |
11 | |
10 | |
9 | |
8 |