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
Hamdan1234
Helper III
Helper III

Two IF condition based on measure

I have a measure of Dax and I want to create another measure based on it. Below given table is measure  condition and outcome that should come. 

MeasureStatusOutcome
23/12/2021YCompliant
02/11/2020YNot Compliant
13/05/2021NNot Required
07/02/2021NNot Required
31/08/2020YNot Compliant

I want if status is N the outcome should be Not required but If status is Y then it should go measure of date and check if date is less than today so Non compliant and if date measure is greater than today it should be compliant. Can anyone help? It would be really helpful.

Thanks

1 ACCEPTED SOLUTION
Hamdan1234
Helper III
Helper III

This worked for me
Outcome =
SWITCH(
TRUE(),
'Table'[Status]="N","Not Required",
'Table'[Status]="Y" && [Measure]<TODAY(),"Non Compliant","Complaint")

View solution in original post

5 REPLIES 5
Hamdan1234
Helper III
Helper III

This worked for me
Outcome =
SWITCH(
TRUE(),
'Table'[Status]="N","Not Required",
'Table'[Status]="Y" && [Measure]<TODAY(),"Non Compliant","Complaint")
amaniramahi
Helper V
Helper V

or based on what I comprehended, here is the solution

 

Outcome = 
var CheckDate = if(Measure<today(),"Not Compliant","Compliant")
return
if(Status="N","Not Required",Outcome)

amaniramahi
Helper V
Helper V

Hi, 

tbh I think we need you to elaborate.. 
the table above is the outcome or the table you have?

Hello @amaniramahi ,

First two columns are to be used while third column is what I am expecting the answer should be.

so check my other comment

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

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

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.