cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
eddd83 Regular Visitor
Regular Visitor

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, or sum to get a single result."

 

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

Accepted Solutions
Highlighted
LivioLanzo Super Contributor
Super Contributor

Re: dax studio - filter function

I believe this will have your answer:

 

https://www.sqlbi.com/articles/from-sql-to-dax-joining-tables/

 


 


Did I answer your question correctly? Mark my answer as a solution!


Proud to be a Datanaut!  

View solution in original post

1 REPLY 1
Highlighted
LivioLanzo Super Contributor
Super Contributor

Re: dax studio - filter function

I believe this will have your answer:

 

https://www.sqlbi.com/articles/from-sql-to-dax-joining-tables/

 


 


Did I answer your question correctly? Mark my answer as a solution!


Proud to be a Datanaut!  

View solution in original post

Helpful resources

Announcements
Can You Solve These Challenge

Challenge: Can You Solve These?

Find out how to participate in the first Power BI 'Can You Solve These?' challenge.

New Badges

Incoming: New and Improved Badges

Exciting news: We've given our badges an overhaul and added brand news ones.

Ask Amir Anything

Exclusive LIVE Community Event No. 2 – Ask Amir Anything

Next in our Triple A series: Ask Amir Netz questions about the latest updates, features and future.

Analytics in Azure virtual event

Analytics in Azure virtual event

Experience a limitless analytics service built to ingest, prep, manage, and serve data for immediate use in Power BI.

Users Online
Currently online: 256 members 2,777 guests
Please welcome our newest community members: