Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers!
Enter the sweepstakes now!Prepping for a Fabric certification exam? Join us for a live prep session with exam experts to learn how to pass the exam. Register 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],
" & "
)
Check out the April 2025 Power BI update to learn about new features.
Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.
User | Count |
---|---|
17 | |
14 | |
13 | |
12 | |
10 |
User | Count |
---|---|
11 | |
10 | |
6 | |
6 | |
6 |