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

Concat strings and formula in count if condition

Hi everyone,

I have access to a database that cannot be modified with a column giving the week number as follows "2018 W1", "2021 W40", etc etc

I want to create a KPI giving the distinct numbers of event generated during the previous week and I do not know the syntax to do it : 

Measure : Count({<[Event Creation Date.Calendar.Week]={"year(today()) & ' W' & week(today())-1"}>} distinct [Event ID])

And the output result is always 0

Can you please help ?

Thanks 🙂

1 Reply
chrismarlow
Specialist II
Specialist II

Hi,

It does not seem to like trying to subtract 1 from the week & then bolt together as a string ... could you try taking off 7 days & taking  the week?

Count({<[Event Creation Date.Calendar.Week]={"$(=year(today())& ' W' & week(today()-7))"}>} distinct [Event ID])

Cheers,

Chris.