Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

Static Segmentation Question

 

pbi.PNGHi - I was reading the post about this technique from https://www.daxpatterns.com/static-segmentation/ and am hoping someone could explain the syntax of the FILTER function. 

Specifically, why is it that 'Ranges' is the table in FILTER and not 'Sales' which is the table with the rows that we're iterating over? Basically, my question is why is the syntax not: 

FILTER(
           Sales,
           Sales[Price] >= Ranges[Min Price]&&
           Sales[Price] < Ranges[Max Price]

Thanks so much!



1 ACCEPTED SOLUTION
v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @Anonymous,

 

Have you solved your problem?

 

If you have solved, please accept the replies making sense as solution to your question so that people who may have the same question can get the solution directly.

 

If you still need help, please feel free to ask.

 

Best Regards,

Cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @Anonymous,

 

Have you solved your problem?

 

If you have solved, please accept the replies making sense as solution to your question so that people who may have the same question can get the solution directly.

 

If you still need help, please feel free to ask.

 

Best Regards,

Cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
TomMartens
Super User
Super User

Hey,

 

you have to consider what the calculation want to achieve ...

 

The fact "sales" table should be able to be sliced by the price range.

This requires a "calculated column" in the fact table that contains a value from the range table.

 

Due to the fact that the calculation "happens" in the fact table, the values of the current row from sales table can be usesd within the condition of the FILTER part.

This in combination with the iteration over Ranges (FILTER is an iterator) allows to use the references to both tables without any Aggregation function).

An iteration over the Sales table would also result to an error, because the Ranges reference can not be resolve to a single value.

 

Another smaller detail (one of the mysterious of VALUES), if the returning table just contains one row, this row will be transformed into a scalar (a single value) if needed. This is necessary because a calculated column expects a value and not a table. For this reason the usage of VALUES also "detects" errors in the configuration of the ranges, overlapping,

 

Guess, this is one the DAX statements, that despite it's less number of components, raises a lot of questions (at least it should, if one tries to fully understand DAX).

 

Hopefully this answer adds some additional insight.

 

Regards,

Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors