March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Goal: I have a date slicer of date hierarchy (year, quarter, month). Based on user's selection, I need to create a dynamic title that captures all year, quarter, and month selected. Quarter(s) and month(s) follow after their respective year. For example, 2023 Q1 M1, 2 & 2024 Q2 M4. The title can get long but I will keep the question simple for now and worry about the length later.
Data Model: One fact table and one calendar table related by the [Date] column. Calendar table was generated from the [Date] column in the fact table. The calendar table has following 4 columns: [Date] - date type, [Year] & [Quarter] & [Month] - whole number type.
This question is about the date slicer selection. I will save the time by not involving the fact table here.
DAX I need help with:
Title =
Solved! Go to Solution.
Title =
VAR SelectedYears =
SUMMARIZECOLUMNS(
'Calendar'[Year],
'Calendar'[Quarter],
'Calendar'[Month]
)
RETURN
CONCATENATEX(
SelectedYears,
[Year] & " Q" & [Quarter] & " M" & [Month],
" & "
)
@lbendlin You are such a genius! Your DAX is simple and works wonder. I could have stopped here. But I added a few lines on top of your DAX to produce the right format for my situation - reduced the title length just a little bit.
Title =
VAR SelectedYears =
SUMMARIZECOLUMNS(
'Calendar'[Year],
'Calendar'[Quarter],
'Calendar'[Month]
)
RETURN
CONCATENATEX(
SelectedYears,
[Year] & " Q" & [Quarter] & " M" & [Month],
" & "
)
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
23 | |
15 | |
12 | |
9 | |
8 |
User | Count |
---|---|
41 | |
32 | |
29 | |
12 | |
12 |