As a newbie I am stuck on this one for hours now not knowing why it won't work. I am trying to create a new column like below, but I get an error: The expression contains multiple columns, but only a single column can be used in a True/False expression that is used as a table filter expression. Can someone tell me where do I have multiple columns?
I have a table ReportData with many Columns (Event, CompanyGuid etc..) I have another table Consumer where I am creating additional columns. What I want is a count of Expired events from ReportData table. That is for a given LeadId if there exists an Event Expired and also an Event Proposed with Conusmer.CompayGuid being that of Consumer table CompanyGuid.
@Anonymous I not sure why you used Selectedcolumns, It seems you wanted to [leadid] in addition to the var tables. But it looks like the LeadId is already in the report data table. Try your dax without selectedcolumns.
VAR __ProposedIds=CALCULATETABLE(ReportData,ReportData[Event] = "Proposed" && ReportData[Consumer.CompanyGuid] = Consumer[CompanyGuid])
VAR __ExpiredIds=CALCULATETABLE(ReportData,ReportData[Event] = "Expired")
RETURN COUNTROWS( INTERSECT(__ProposedIds, __ExpiredIds)) + 0
Paul Zheng _ Community Support Team If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos🙂 Feel free to email me with any of your BI needs.
Yes the issue seems to be there, because if I remove the AND condition then I get 0 as my value. ReportData is a new table which is the result of a LEFT JOIN of another table and Consumer table. Now I am extending the Consumer table with new columns. Any tips?