Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
rustyfishbones
Master II
Master II

Alternate States Issue, Driving me crazy!

Hi All,

I have the following issue, when I use option 1 below in a straight table, it returns no result, I have 2 date listboxes, one is inherited state and the other has an alternate state of altDate

1. =(WEEK(DATE(MAX({altDate}[Stat Date])))-WEEK(DATE(MIN([Stat Date]))))

if I select all the dates required from the inherited date listbox using option 2. below it works, but thats not how i want them to select

2. =(WEEK(DATE(MAX([Stat Date])))-WEEK(DATE(MIN([Stat Date]))))

Thanks in advance

Labels (3)
1 Solution

Accepted Solutions
sunny_talwar

Try this

=Week(Max(TOTAL {altDate} [Stat Date])) - Week(Min(TOTAL [Stat Date]))

View solution in original post

5 Replies
rustyfishbones
Master II
Master II
Author

@Gysbert_Wassenaar  have you seen a similar issue to this before?

sunny_talwar

What exactly are you trying to do? Select Max Stat Date from altDate and subtract Min Stat Date from inherited state? Also, where are you using this chart? In a table or text box object?

rustyfishbones
Master II
Master II
Author

I am using it in an expression in a straight table, I have 2 date list boxes one list box is inherited state the other is altdate.

 

in list box 1 I select 25/09/2019 and in list box 2 I select 21/12/2019, there are 12 weeks between those dates, when I place the expression in a text object it works, but when I use it in a straight table I get a - not even a zero, I have other expressions in the straight table that work perfectly fine, but the one I post containing altDate returns nothing in the straight table

sunny_talwar

Try this

=Week(Max(TOTAL {altDate} [Stat Date])) - Week(Min(TOTAL [Stat Date]))
rustyfishbones
Master II
Master II
Author

That worked, thank you Sunny