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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
eddd83
Resolver I
Resolver I

dax studio - Filter function

Using DAX studio, I'm trying to understand what data this filter function is pulling.

 

EVALUATE
   FILTER ( 'TM Freight Charges', 
       'TM Freight Charges'[Related Order Type] = Fact_Table[Order Type])

 

However, I get the following error message: 

"A single value for column 'Order Type' in table 'Fact_Table' cannot be determined. This can happen when a measure formula refers to a column that contains many values without specifying an aggregation such as min, max, count, sum to get a single result".

 

 

Ultimately, I'm trying to evaluate this particular filter formula

 

Evaluate
  FILTER ('TM Freight Charges',
                    AND (
                        AND (
                            AND (
                                'TM Freight Charges'[Related Order Type] = [Order Type],
                                'TM Freight Charges'[Related Order Number] = [Order Number]
                            ),
                            'TM Freight Charges'[Volume] = Fact_Table[Volume]
                        ),
                        'TM Freight Charges'[Charge Type] = "BASE"
                    )
                )
            )

If this was a SQL problem, I would just do an INNER JOIN along with some WHERE statements, but in DAX Studio, I don't have a clue. Help?

1 ACCEPTED SOLUTION
v-shex-msft
Community Support
Community Support

HI @eddd83,

 

I think you need to take a look at following links about dax row contents and filter contents.

Row Context and Filter Context in DAX

 

Dax formula not support direct compare with single value and multiple.

 

In my opinion, I'liek to suggest you to do aggregation to let it return single value to compare or use 'contains' function, 'in' operator to compare with these values.

 

Regards,

XIaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

1 REPLY 1
v-shex-msft
Community Support
Community Support

HI @eddd83,

 

I think you need to take a look at following links about dax row contents and filter contents.

Row Context and Filter Context in DAX

 

Dax formula not support direct compare with single value and multiple.

 

In my opinion, I'liek to suggest you to do aggregation to let it return single value to compare or use 'contains' function, 'in' operator to compare with these values.

 

Regards,

XIaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.