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!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Hi,
I need some help.😎
The measure 'MeasureWeeks' bellow works correct when selected one value from slicer (YearWeeknumber) for example value 202015.
Some records from tabel 'INFOR260_BSNS_ACT_PLANNING_T' will have Yes and some No.
What to do when i want to select more than one value. For example 202015, 2012019 and 202022.
Loop?
MeasureWeeks =
VAR checkDate =
IF (
SELECTEDVALUE ( 'DateTabel'[YearWeeknumber.] );
MIN('DateTabel'[YearWeeknumber.] );
concatenate(year(today());weeknum(today()))
--"202012"
)
RETURN
IF (
MIN ( INFOR260_BSNS_ACT_PLANNING_T[StartWeek] ) = Checkdate && MIN ( INFOR260_BSNS_ACT_PLANNING_T [EndWeek] ) = Checkdate
||
MIN ( INFOR260_BSNS_ACT_PLANNING_T[EndWeek] ) = Checkdate
||
MIN ( INFOR260_BSNS_ACT_PLANNING_T[StartWeek] ) = Checkdate
||
MIN ( INFOR260_BSNS_ACT_PLANNING_T[StartWeek] ) < Checkdate && MIN ( INFOR260_BSNS_ACT_PLANNING_T[EndWeek] ) > Checkdate
;
"Yes";
"No"
)
Solved! Go to Solution.
Hi @Anonymous
When select 202015 from slicer the IF statement wil be StartWeek and EndWeek = 202015 (VAR checkDate).
Some records wil have MeasureWeeks Yes and some NO.
By filtering on MeasureWeeks = Yes is wil have the correct records.
This works correct when select one value.
I want to select more than one value from slicer: 202015 and 202018.
loop 1
StartWeek and EndWeek = 202015
loop 2
StartWeek and EndWeek = 202018
After the run I have all records that meet the specified conditions
Lex
The problem is not well-defined. Please, would you mind telling us what you want to achieve?
You say:
What to do when i want to select more than one value. For example 202015, 2012019 and 202022. Loop?
You should at least tell us what you want to do in your measure when there are multiple values selected in your slicer.
By the way, the first logical condition in the alternative under IF is completely redundant. You can and should remove it.
Best
D
Hi @Anonymous
When select 202015 from slicer the IF statement wil be StartWeek and EndWeek = 202015 (VAR checkDate).
Some records wil have MeasureWeeks Yes and some NO.
By filtering on MeasureWeeks = Yes is wil have the correct records.
This works correct when select one value.
I want to select more than one value from slicer: 202015 and 202018.
loop 1
StartWeek and EndWeek = 202015
loop 2
StartWeek and EndWeek = 202018
After the run I have all records that meet the specified conditions
Lex
Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
Can you explain what you are trying to accomplish?
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.