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 want to get the row count of a table after filtering some rows based on Customership Slice and Date Range Slice. Here StartDate & EndDate comes from Date Range Slice and SCustomership from Customership Dropdown Slice. What am I doing wrong here?
Summary Customer =
VAR StartDate = FIRSTDATE(Calender[Date])
VAR EndDate = LASTDATE(Calender[Date])
VAR SCustomership = SELECTEDVALUE(Customership[Type])
RETURN
CALCULATE(
COUNTROWS(CustomersPlan),
FILTER(
CustomersPlan,
OR(
AND(
SCustomership = "Active",
AND(
CustomersPlan[startdate] < EndDate,
OR(ISBLANK(CustomersPlan[enddate]), CustomersPlan[enddate] >= EndDate)
)
),
AND(
SCustomership = "Everything",
DATESBETWEEN(CustomersPlan[startdate], StartDate, EndDate) ||
DATESBETWEEN(CustomersPlan[enddate], StartDate, EndDate) ||
AND(
CustomersPlan[startdate] < StartDate,
(ISBLANK(CustomersPlan[enddate]) || CustomersPlan[enddate] > EndDate)
)
)
)
)
)
I get following error when I added this measure to a label.
Error Message:
MdxScript(Model) (28, 21) Calculation error in measure 'CustomersPlan'[Summary Customer]: A table of multiple values was supplied where a single value was expected.
Solved! Go to Solution.
@srineshnisala ,datesbetween return a series of dates
AND(
SCustomership = "Everything",
(CustomersPlan[startdate]>= StartDate && CustomersPlan[startdate]<= EndDate) ||
(CustomersPlan[enddate]>= StartDate && CustomersPlan[enddate]<= EndDate) ||
AND(
CustomersPlan[startdate] < StartDate,
(ISBLANK(CustomersPlan[enddate]) || CustomersPlan[enddate] > EndDate)
)
)
@srineshnisala ,datesbetween return a series of dates
AND(
SCustomership = "Everything",
(CustomersPlan[startdate]>= StartDate && CustomersPlan[startdate]<= EndDate) ||
(CustomersPlan[enddate]>= StartDate && CustomersPlan[enddate]<= EndDate) ||
AND(
CustomersPlan[startdate] < StartDate,
(ISBLANK(CustomersPlan[enddate]) || CustomersPlan[enddate] > EndDate)
)
)
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!