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

Did you hear? There's a new SQL AI Developer certification (DP-800). Start preparing now and be one of the first to get certified. Register now

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
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.