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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
aservan
New Member

convert

Guys, I have a problem, I can't convert this select to PB's DAX, could someone help me?

 

>>SELECT count(*) as open_open FROM [BASE].[dbo].[Fact_Call] to where a.DateOpen <= '2022-10-31' and (a.StatusCalledID not in (4, 12) or (a.StatusCalledID in (4, 12) and a.DateClosing > '2022-10-31'))<<

1 ACCEPTED SOLUTION
JorgePinho
Solution Sage
Solution Sage

Hello @aservan !

 

I think you want something like this:

open_open = 
CALCULATE(COUNT([insert column]), OR(a.DateOpen <= DATE(2022,10,31) && NOT(a.StatusCalledID IN {4,12}), a.StatusCalledID IN {4,12} && a.DateClosing > DATE(2022,10,31)))

 

View solution in original post

2 REPLIES 2
JorgePinho
Solution Sage
Solution Sage

Hello @aservan !

 

I think you want something like this:

open_open = 
CALCULATE(COUNT([insert column]), OR(a.DateOpen <= DATE(2022,10,31) && NOT(a.StatusCalledID IN {4,12}), a.StatusCalledID IN {4,12} && a.DateClosing > DATE(2022,10,31)))

 

TKS MANNNN!

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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