Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi - could someone explain what was done incorrectly with this measurement? Power BI is stating my syntax for 'StartofQuarter' is incorrect.
Solved! Go to Solution.
Hi @kl8818 ,
At my knowledge, the STARTOFQUARTER function expects a date column as an argument, not a single date value.
Please try something like this
Agree / Strongly Agree QTR (%) =
VAR CurrentDate = TODAY()
VAR CurrentYear = YEAR(CurrentDate)
VAR CurrentQuarter = QUARTER(CurrentDate)
VAR _StartOfQuarter =
SWITCH(
TRUE(),
CurrentQuarter = 1, DATE(CurrentYear, 1, 1),
CurrentQuarter = 2, DATE(CurrentYear, 4, 1),
CurrentQuarter = 3, DATE(CurrentYear, 7, 1),
CurrentQuarter = 4, DATE(CurrentYear, 10, 1)
)
RETURN ***
Best Regards,
Wearsky
Hi @kl8818 ,
At my knowledge, the STARTOFQUARTER function expects a date column as an argument, not a single date value.
Please try something like this
Agree / Strongly Agree QTR (%) =
VAR CurrentDate = TODAY()
VAR CurrentYear = YEAR(CurrentDate)
VAR CurrentQuarter = QUARTER(CurrentDate)
VAR _StartOfQuarter =
SWITCH(
TRUE(),
CurrentQuarter = 1, DATE(CurrentYear, 1, 1),
CurrentQuarter = 2, DATE(CurrentYear, 4, 1),
CurrentQuarter = 3, DATE(CurrentYear, 7, 1),
CurrentQuarter = 4, DATE(CurrentYear, 10, 1)
)
RETURN ***
Best Regards,
Wearsky
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 8 | |
| 6 | |
| 6 | |
| 5 | |
| 4 |
| User | Count |
|---|---|
| 25 | |
| 14 | |
| 8 | |
| 8 | |
| 8 |