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!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Dear community members,
Although from the first look issue seemed to be easy, I as a beginner still can not solve it.
I made calculated column Quarter = QUARTER([Date]), which perfectly returns quarters (1,2,3,4) both in data model and in slicer (4 options for quarters). I need different measures for each of quarter, i.e., IF (Quarter = 1, measure A, (IF Quarter = 2, measure B, (IF Quarter = 3, measure C, (IF Quarter = 4, measure D)))), so Quarter would be a reference to calculate 4 different measures.
But, because of row context (data model has many columns) Quarter function returns all instances of Quarters associated with [Date], which is shown in matrix table (such result also in Power BI) below.
[Date] dimension is quarterly based.
Some function/ group of functions are needed which tell that there are only 4 cases of Quarters. I.e. something opposite ALL function, which not excludes, but includes row context of other columns of data model. I tried to manipulate QUARTER([Date]) with other functions, but QUARTER function seems not to like it.
Any ideas?:)
Regards,
Ervins
Solved! Go to Solution.
@Anonymous
When inserting the quarter column, it sums it. Instead, you can create your measure as follows:
Measure =
SWITCH(
MAX( Table1[Quarter] ),
1, [Measure A ],
2, [Measure B ],
3, [Measure C ],
4, [Measure D ]
)
Or, without the help of the Quarter column
Measure =
SWITCH(
QUARTER( MAX (Table1[Date] )),
1, [Measure A ],
2, [Measure B ],
3, [Measure C ],
4, [Measure D ]
)
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
@Anonymous
When inserting the quarter column, it sums it. Instead, you can create your measure as follows:
Measure =
SWITCH(
MAX( Table1[Quarter] ),
1, [Measure A ],
2, [Measure B ],
3, [Measure C ],
4, [Measure D ]
)
Or, without the help of the Quarter column
Measure =
SWITCH(
QUARTER( MAX (Table1[Date] )),
1, [Measure A ],
2, [Measure B ],
3, [Measure C ],
4, [Measure D ]
)
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 9 | |
| 9 | |
| 8 | |
| 6 | |
| 6 |
| User | Count |
|---|---|
| 21 | |
| 20 | |
| 20 | |
| 14 | |
| 14 |