cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Capture Rows That Are Increments Of 5 Only

Hi,

 

I have data like this:

date[datetime], count of days[int], ticket ref[int]

 

I want to put a flag on each row where it is an increment of 5, e.g. 5, 10,15,20,25 and so on. This can go into the hundreds so I wanted to make it dynamic.

Tried this:

 

 

if List.Contains({List.Numbers(5,500000,5)},[Days Idle]) then "true"
else "false"

 

 

 

That didn't work I am assuming because list.numbers won't work with list.contains as that requires the numbers to be split out.

 

Could someone please steer me in the right direction?

 

Many Thanks
POC

1 ACCEPTED SOLUTION
HotChilli
Super User II
Super User II

I think you can use

Number.Mod(theColumn, 5)

 just test the result against 0.  If it's 0, then it's divisible by 5

View solution in original post

2 REPLIES 2
HotChilli
Super User II
Super User II

I think you can use

Number.Mod(theColumn, 5)

 just test the result against 0.  If it's 0, then it's divisible by 5

View solution in original post

Anonymous
Not applicable

Perfect thank you, it did indeed work. now I just target 0 as the filter 🙂

Helpful resources

Announcements
PBI_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Get Ready for Power BI Dev Camp

Microsoft named a Leader in The Forrester Wave

Microsoft received the highest score of any vendor in both the strategy and current offering categories.

Get Ready for Power BI Dev Camp

Power BI Dev Camp - September 30th, 2021

Mark your calendars and join us for our next Power BI Dev Camp!

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Top Solution Authors