Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
Hello,
I have a month selector, as well as a 'last x months' parameter selector.
How do you show a dynamic title or header based on the selected month and selected last x months?
As examples in the image below, I would like to show the selected months (highlighted in yellow). Thanks.
Solved! Go to Solution.
hi @Oros
You will need to use a disconnected table for the count of months to add and the selected months. Below is the sample formula I used to obtain the title in the table in the screenshot
Periods Included =
VAR FilteredTable =
FILTER (
CALCULATETABLE (
VALUES ( DatesTable[Date] ),
DATESINPERIOD (
DatesTable[Date],
MAX ( DisconnectedDatesTable[Date] ),
- [XPeriod Value],
MONTH
)
),
DatesTable[Date]
= CALCULATE ( EOMONTH ( MAX ( DatesTable[Date] ), -1 ) + 1 )
)
VAR AddedColumns =
ADDCOLUMNS ( FilteredTable, "@Month Name", FORMAT ( [Date], "mmm" ) )
RETURN
CONCATENATEX ( AddedColumns, [@Month Name], ", ", [Date], ASC )
Please see the attached pbix.
Proud to be a Super User!
hi @Oros
You will need to use a disconnected table for the count of months to add and the selected months. Below is the sample formula I used to obtain the title in the table in the screenshot
Periods Included =
VAR FilteredTable =
FILTER (
CALCULATETABLE (
VALUES ( DatesTable[Date] ),
DATESINPERIOD (
DatesTable[Date],
MAX ( DisconnectedDatesTable[Date] ),
- [XPeriod Value],
MONTH
)
),
DatesTable[Date]
= CALCULATE ( EOMONTH ( MAX ( DatesTable[Date] ), -1 ) + 1 )
)
VAR AddedColumns =
ADDCOLUMNS ( FilteredTable, "@Month Name", FORMAT ( [Date], "mmm" ) )
RETURN
CONCATENATEX ( AddedColumns, [@Month Name], ", ", [Date], ASC )
Please see the attached pbix.
Proud to be a Super User!
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
User | Count |
---|---|
126 | |
78 | |
76 | |
59 | |
51 |
User | Count |
---|---|
164 | |
86 | |
68 | |
68 | |
58 |