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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Amarreddyetcs
New Member

If status is Approved, display 0 If status is not approved , display no.of days waiting for pending

Hi All,

 

Kindly help me on below query.

 Result:-

DateSiteStatusNo.of days waiting
  Approved         22
  Pending from Approval         33
  Pending from Approval         33
  Pending from Approval         33
  Approved         24
    

 

 

Expected Result:- 

 

 

DateSiteStatusNo.of days waiting
  Approved         0
  Pending from Approval        33
  Pending from Approval        33
  Pending from Approval       33
  Approved        0

already created two columns in power BI visual 

 

1) Status = if (ISBLANK(Table1[Column1]),"Pending from Approver",  

If (Table1[Column1]) = "New", "Approved")) 

Note:-(Status column was displaying result like  "New" and Balnk values , so written above formula )

 

2)

No.of_Days wating = DATEDIFF(Table1[Date],TODAY(),DAY)

 

Could plz help out If status is Approved, No.of days waiting level should display 0(Zero) only.

 

Thanks for Advance.

 

 

 

 

 

 

1 ACCEPTED SOLUTION
Greg_Deckler
Community Champion
Community Champion

@Amarreddyetcs As a column:

No.of_Days wating = IF([Status] = "Approved", 0, DATEDIFF(Table1[Date],TODAY(),DAY))


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

2 REPLIES 2
Greg_Deckler
Community Champion
Community Champion

@Amarreddyetcs As a column:

No.of_Days wating = IF([Status] = "Approved", 0, DATEDIFF(Table1[Date],TODAY(),DAY))


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Thank so much Sir given quick solution.. @Greg_Deckler 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.