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 have two table.
First table is Location, and columns names are Region Name,Site Name and Quantity.
Other table's name is Data, and column names are Date, Site Name, and Value.
There are two Calculated Measure.
Fist calculate measure's name is WeightedAverage and is calculated by ABS ( SUMX ( 'Data', Data[Value)] * RELATED(Location[Quantity]) ) / SUMX('Data', RELATED(Location[Quantity])) )
Other Calculated Measure name is DateRangeValue, and is calculated by CALCULATE([WeightedAverage],AND (Data[Date]>=Date1,Data[Date]<=Date2)) to calculate Weighted Average between two dates.
I want to count the regions which has DayRange value is not null and higher than 2.
I create a DAX as below to calculate this, it is working but giving a wrong answer.
DISTINCTCOUNT(Location[Region],
FILTER (Location, DayRange>2 && ISBLANK(DayRange)=False))
Could you please help me to fix it?
Solved! Go to Solution.
@tolgalogy , Try like
countx(FILTER (Values(Location[Region]), DayRange>2 && ISBLANK(DayRange)=False),[Region])
@tolgalogy , Try like
countx(FILTER (Values(Location[Region]), DayRange>2 && ISBLANK(DayRange)=False),[Region])
Thank you @amitchandak
I used your suggestion, and transform my code as
CALCULATE(
DISTINCTCOUNT (Location[Region],
FILTER (Values(Location[Region]),
DayRange>2 && NOT (ISBLANK(DayRange)
)
)
)
Check out the November 2025 Fabric 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!