Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin 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.
Hello Experts!
I have a measure which sums values based on selected value of slicers, namely Year and Period. My question is about dynamically changing values in the FILTER part.
That depends on the selected period in the clicer.
FCST012 Forecast =
VAR Ayear =
SELECTEDVALUE ( Dim_YearPeriod[Year] )
VAR Aperiode =
SELECTEDVALUE ( Dim_YearPeriod[PERIOD] )
VAR Aperiode2 =
IF(SELECTEDVALUE ( Dim_YearPeriod[Period] ) <= 9, "0" & Aperiode, Aperiode)
RETURN
CALCULATE (
SUM ( fact_Consolidated[VALUECOLUMN] ),
fact_Consolidated[SCENARIO]
= Ayear & Aperiode2 & "FCT_CON",
FILTER (
ALL ( Dim_YearPeriod ),
Dim_YearPeriod[Year] = Ayear
&& Dim_YearPeriod[PERIOD] = ??????
)
)
On top there are two slicers for year and period. The question marks is the part I can’t figure out.
It should be the remaining periods. If slicers are as follows: 2022 and period 6 it should be period 7 && 8 && 9 && 10 && 11 && 12.
If selected period is 7 it should be period 8 && 9 && 10 && 11 && 12 etc.
Any help on how i can dynamically pass those values in the FILTER part of the measure is much appreciated.
Solved! Go to Solution.
I understand you want to figuer Remaining period with larger than selected period, try this
RETURN
CALCULATE (
SUM ( fact_Consolidated[VALUECOLUMN] ),
fact_Consolidated[SCENARIO]
= Ayear & Aperiode2 & "FCT_CON",
FILTER (
ALL ( Dim_YearPeriod ),
Dim_YearPeriod[Year] = Ayear
&& Dim_YearPeriod[PERIOD] > Aperiod
)
)
I understand you want to figuer Remaining period with larger than selected period, try this
RETURN
CALCULATE (
SUM ( fact_Consolidated[VALUECOLUMN] ),
fact_Consolidated[SCENARIO]
= Ayear & Aperiode2 & "FCT_CON",
FILTER (
ALL ( Dim_YearPeriod ),
Dim_YearPeriod[Year] = Ayear
&& Dim_YearPeriod[PERIOD] > Aperiod
)
)
Thanks Hoang Hugo, this totally did the job!
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 76 | |
| 37 | |
| 31 | |
| 27 | |
| 27 |