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
mluanacruz
Helper I
Helper I

Days going into the wrong buckets

l all,
I have been bumping my head into the wall all day trying to figure out this formula and why it's not working.

 

I have this formula: 

 

Nol to pay buckets - case2 = IF([NOL to Payment]<=1,"Same Day",IF([NOL to Payment]>1 && [NOL to Payment] <=7,"1-7", IF([NOL to Payment] >7 && [NOL to Payment]<=10,"7 -10 Days",IF([NOL to Payment]>10 && [NOL to Payment] <=18, "10-18 Days",">10"))))

 
and the days listed in the pictures do not align with my formula.
 

 

Capture.PNG

Can you please advise?

 

Thank you, 

M

1 ACCEPTED SOLUTION
PhilipTreacy
Super User
Super User

Hi @mluanacruz 

 

Download example PBIX file

 

How are you calculating your [NOL to Payment] measure?  Please provide the code.

 

With the sample data I set up and this measure

 

Nol to pay buckets = 

SWITCH(

    TRUE(),

    ISBLANK([NOL_to_Payment]), BLANK(),
    
    [NOL_to_Payment]<=1,"Same Day",

    [NOL_to_Payment]>1 && [NOL_to_Payment] <=7,"1-7", 
    
    [NOL_to_Payment] >7 && [NOL_to_Payment]<=10,"7 -10 Days",
    
    [NOL_to_Payment]>10 && [NOL_to_Payment] <=18, "10-18 Days",
    
    ">10")

 

Things seem to work correctly

 

noltp.png

 

Regards

 

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


View solution in original post

1 REPLY 1
PhilipTreacy
Super User
Super User

Hi @mluanacruz 

 

Download example PBIX file

 

How are you calculating your [NOL to Payment] measure?  Please provide the code.

 

With the sample data I set up and this measure

 

Nol to pay buckets = 

SWITCH(

    TRUE(),

    ISBLANK([NOL_to_Payment]), BLANK(),
    
    [NOL_to_Payment]<=1,"Same Day",

    [NOL_to_Payment]>1 && [NOL_to_Payment] <=7,"1-7", 
    
    [NOL_to_Payment] >7 && [NOL_to_Payment]<=10,"7 -10 Days",
    
    [NOL_to_Payment]>10 && [NOL_to_Payment] <=18, "10-18 Days",
    
    ">10")

 

Things seem to work correctly

 

noltp.png

 

Regards

 

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


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.