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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Ramees_123
Helper IV
Helper IV

Logical DAX getting error due to multiple columns

I am usng the below DAX query. Using differnt fields inside AND and OR logical functions.

 

CALCULATE(DISTINCTCOUNT('Issue Register Calc'[Issue ID]),'Issue Register Calc'[Date Issue Raised] < Realdate,
OR(AND(ISBLANK('Issue Register Calc'[Issue Closure Date]),'Issue Register Calc'[Issue Status(Open / Closed)] <> "Closed"),
AND('Issue Register Calc'[Issue Closure Date]>= Realdate,'Issue Register Calc'[Issue Status(Open / Closed)] = "Closed")))
 
Getting error that "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."
 
How to handle this ? Please help.
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Ramees_123 , his seems fine at first look hope rel data is a var

 

example like 

var Realdate  = maxx(allselected(Date), Date[Date]) //Not valuesDate[Date]) , values will not work

 

Small change here too

CALCULATE(DISTINCTCOUNT('Issue Register Calc'[Issue ID]),filter('Issue Register Calc', 'Issue Register Calc'[Date Issue Raised] < Realdate &&
OR(AND(ISBLANK('Issue Register Calc'[Issue Closure Date]),'Issue Register Calc'[Issue Status(Open / Closed)] <> "Closed"),
AND('Issue Register Calc'[Issue Closure Date]>= Realdate,'Issue Register Calc'[Issue Status(Open / Closed)] = "Closed"))))

View solution in original post

2 REPLIES 2
Kumail
Post Prodigy
Post Prodigy

Hello @Ramees_123 

 

If you could briefly explain the logic that you are looking to acheive and send sample .pbix that demonstrate what you are looking to get. It would really help providing you a quick solution.

 

You can send the sample .pbix file by adding it to your drive or dropbox and add the link here. 

 

Regards
Kumail Raza

amitchandak
Super User
Super User

@Ramees_123 , his seems fine at first look hope rel data is a var

 

example like 

var Realdate  = maxx(allselected(Date), Date[Date]) //Not valuesDate[Date]) , values will not work

 

Small change here too

CALCULATE(DISTINCTCOUNT('Issue Register Calc'[Issue ID]),filter('Issue Register Calc', 'Issue Register Calc'[Date Issue Raised] < Realdate &&
OR(AND(ISBLANK('Issue Register Calc'[Issue Closure Date]),'Issue Register Calc'[Issue Status(Open / Closed)] <> "Closed"),
AND('Issue Register Calc'[Issue Closure Date]>= Realdate,'Issue Register Calc'[Issue Status(Open / Closed)] = "Closed"))))

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.