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
Anonymous
Not applicable

DAX Measure error using contains

Hi Experts

 

Cannot see my error with the following measure when using contains in a DAX Measure

Days Used =

If('FACT_Scheduler Data_All'[Name] = "John" && contains('FACT_Scheduler Data_All','FACT_Scheduler Data_All'[Subject],"OOO"),0,

If('FACT_Scheduler Data_All'[Name] = "John" && 'FACT_Scheduler Data_All'[Subject] = "Unavailable",0)))

column [Subject] has the following text OOO thrusday & friday

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , That is fine as a column, not as measure.

 

For measure you try like

 

Days Used =

If(max('FACT_Scheduler Data_All'[Name]) = "John" && contains('FACT_Scheduler Data_All',max('FACT_Scheduler Data_All'[Subject]),"OOO"),0,

If(max('FACT_Scheduler Data_All'[Name]) = "John" && max('FACT_Scheduler Data_All'[Subject]) = "Unavailable",0))

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@Anonymous , That is fine as a column, not as measure.

 

For measure you try like

 

Days Used =

If(max('FACT_Scheduler Data_All'[Name]) = "John" && contains('FACT_Scheduler Data_All',max('FACT_Scheduler Data_All'[Subject]),"OOO"),0,

If(max('FACT_Scheduler Data_All'[Name]) = "John" && max('FACT_Scheduler Data_All'[Subject]) = "Unavailable",0))

Anonymous
Not applicable

Hi Amit.....Error on my part its a caculated column measure.....sorry

Hi, @Anonymous 

Not sure what you mean by 'caculated column measure'.

If your problem has been solved, you could accept the helpful answer as solution to close this thread. 

It will help other community members easily find the solution when they get the similar issue.

 

Best Regards,
Community Support Team _ Eason

 

 

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

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

MayPowerBICarousel

Power BI Monthly Update - May 2024

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

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.