Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Why is mod() failing?

This expression shows nothing in my chart:

Mod(WeekDay(Min(timestamp)) + 2.5, 7)

But these two expressions render expected values:

Mod(WeekDay(Min(timestamp)) + 2, 7)

WeekDay(Min(timestamp)) + 2.5

Why is Mod() failing in the first expression?

Also some bonus points questions: 1. Is there a way to see what the underlying error in a chart is, instead of a blank chart?  2. Is using Mod() or NumMin() just as bad as using If() in terms of chart performance?

Many Thanks,

Paul

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Don't know why it doesn't work but will FMod(WeekDay(Min(timestamp)) + 2.5, 7) work?  It may be because its not interpreting the first input as an integer.

or

Mod(num((WeekDay(Min(timestamp))) + 2.5, 7)

View solution in original post

2 Replies
Anonymous
Not applicable
Author

Don't know why it doesn't work but will FMod(WeekDay(Min(timestamp)) + 2.5, 7) work?  It may be because its not interpreting the first input as an integer.

or

Mod(num((WeekDay(Min(timestamp))) + 2.5, 7)

Not applicable
Author

FMod() works perfectly, thanks for the fast response!