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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

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
Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!