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
I would like to create a measure "forecast" by checking the quarter selected and display different set of values.
The result for each quarter is correct as shown in table below. however the total is blank. how do i go about get the total of Quarter 1 to 4.
thanks.
| Quarter | 1 | 2 | 3 | 4 | Total |
| Forecast | Forecast | Forecast | Forecast | Forecast | |
| 200 | 100 | 150 | 400 |
Solved! Go to Solution.
Hi @evez ,
You can try this-
Forecast =
IF(
HASONEVALUE(all_rates_v[fiscal_quarter]),
SWITCH(
TRUE(),
VALUES(all_rates_v[fiscal_quarter]) = 1, [Actual],
VALUES(all_rates_v[fiscal_quarter]) = 2, [Actual],
VALUES(all_rates_v[fiscal_quarter]) = 3, [forecast],
VALUES(all_rates_v[fiscal_quarter]) = 4, [budget]
),
[Actual] + [Actual] + [forecast] + [budget]
)
Here HASONEVALUE checks if only one quarter is selected.
Hope this helps!
Hi @evez ,
You can try this-
Forecast =
IF(
HASONEVALUE(all_rates_v[fiscal_quarter]),
SWITCH(
TRUE(),
VALUES(all_rates_v[fiscal_quarter]) = 1, [Actual],
VALUES(all_rates_v[fiscal_quarter]) = 2, [Actual],
VALUES(all_rates_v[fiscal_quarter]) = 3, [forecast],
VALUES(all_rates_v[fiscal_quarter]) = 4, [budget]
),
[Actual] + [Actual] + [forecast] + [budget]
)
Here HASONEVALUE checks if only one quarter is selected.
Hope this helps!
@v-sdhruv thanks it works. but i change the code a bit to fit my need.
If this helped, please consider giving kudos and mark as a solution
@me in replies or I'll lose your threadconsider voting this Power BI idea
Francesco Bergamaschi
MBA, M.Eng, M.Econ, Professor of BI
@FBergamaschi thanks for your reply. but it seems not working. now the quarterly number is incorrect too. while the total is still blank. any other way to work around?
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 |
|---|---|
| 11 | |
| 9 | |
| 9 | |
| 6 | |
| 5 |
| User | Count |
|---|---|
| 27 | |
| 22 | |
| 19 | |
| 17 | |
| 11 |