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

cytd kpi won't become static

Hello, 

I have this kpi . CurYTDFlag is a master calendar field based on a field called "Date".

count({1<CurYTDFlag={1},[Order Status] = {'1','2'},
[ordernum] = {"=Len([ordernum]) = 10"}>} distinct [order ID])

which will not become static whenever I choose a random date from my "Date" filter pane.

Thing is, when it's simply

count({1<CurYTDFlag={1}>} distinct [order ID])

it works perfectly.

 

What is wrong?

1 Solution

Accepted Solutions
tresesco
MVP
MVP

Try this:

count({1<CurYTDFlag={1},[Order Status] = {'1','2'},
[ordernum] = {"=Len(only({1}[ordernum])) = 10"}>} distinct [order ID])

View solution in original post

3 Replies
tresesco
MVP
MVP

Try this:

count({1<CurYTDFlag={1},[Order Status] = {'1','2'},
[ordernum] = {"=Len(only({1}[ordernum])) = 10"}>} distinct [order ID])

ioannagr
Creator III
Creator III
Author

Hello, thanks for the quick response,

 

tried it but still not static 😞

 

Edited: *** actually, no, it worked perfectly! Could've never figured out... Thanks 🙂

What does this addition do?

ioannagr
Creator III
Creator III
Author

@tresesco  hello, hope you're well 🙂

I need your help once more for this cytd-lytd. I have the same problem, I want it to not change when i pick a date from the date filter. How to use only{1} here? Or is there another way?

fabs(sum({1}{< curYTDFlag={1},[year]=, [month]= >} [measure])
-Sum({1}{<[Date]={">=$(=YearStart(Max(date([Date),'DD/MM/YYYY'),-1))<=$(=AddYears(Max(date([Date]),'DD/MM/YYYY'),-1))"},[year]=, [month]= >}[measure])
)