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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
singhpratiksha8
Frequent Visitor

how to apply two condition simultaneously

Capture.JPG

 

As mentioned in picture please cheeck the formula where i have created Km bucket through km/day column ,  but i need to run two conditon where if km/day =0 then it should come "NO kMS RUN  and  if  KM/day= Blank then it should come blank or null ... in upper mention formula if km/day is blank then also its coming under "No KM RUN"... please help 

5 REPLIES 5
SivaMani
Resident Rockstar
Resident Rockstar

@singhpratiksha8,

 

Could please share your sample data?

reg no        KM Bucket      KM/Day

 

A                NO KM RUN   

B                1-20 km             10km

C                no Km run          0 km

D                20-40                 25 km

 

 

in sample u can see if km/day is blank then also its coming NO RUN KMS and IF ITS 0 then also its coming NO RUN KM , i m using below mention formula, i need null or blank in km bucket if km/day is blank .  and if its 0 then it should come NO KM RUN

 

KM/Day Bucket = IF('Table'[KMS/day]>=100,"A. >100 kms", if('Table'[KMS/day]>=80,"B. 80-100 kms",if('Table'[KMS/day]>=60,"C. 60-80 kms", if('Table'[KMS/day]=40,"D. 40-60 kms", if('Table'[KMS/day]>=20, "E. 20-40 kms",IF('Table'[KMS/day]>0,"F. 1-20 kms",IF('Table'[KMS/day]=0 , "NO KMS RUN",IF('Table'[KMS/day]=BLANK(),"Null"))))))))

 

Try this,

 

KM/Day Bucket = IF('Table'[KMS/day]>=100,"A. >100 kms", if('Table'[KMS/day]>=80,"B. 80-100 kms",if('Table'[KMS/day]>=60,"C. 60-80 kms", if('Table'[KMS/day]=40,"D. 40-60 kms", if('Table'[KMS/day]>=20, "E. 20-40 kms",IF('Table'[KMS/day]>0,"F. 1-20 kms",IF('Table'[KMS/day]=0 , "NO KMS RUN"))))))), "Null")

Not working

what is the data type of KM/Day field?

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.