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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

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
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

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