Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Comparing two fields on Set Analisys

Thats my data cloud:

TABLE: ATTENDANCE_REGISTER

COLUNS: "REG_NUMBER", "YEAR_MONTH_REGISTERED", "YEAR_MONTH_CLOSED", "%KEY_YEAR_MONTH_NUMBER"

TABLE: CLIENT

COLUNS: "CLI_NUMBER", "YEAR", "MONTH", "%KEY_YEAR_MONTH_NUMBER"

I wanna make a pivot table with these dimensions: "YEAR", "MONTH" and this expression: the quantity of ATTENDENCE_REGISTER that was registered and closed at the same year_month.


The Set Analisys i'm using is:


COUNT({<YEAR_MONTH_REGISTERED={'$(=YEAR_MONTH_CLOSED)'}>} REG_NUMBER)

But it doesnt work! Any one help me?


Thanks!

2 Replies
m_woolf
Master II
Master II

Try:

COUNT({<YEAR_MONTH_REGISTERED={YEAR_MONTH_CLOSED}>} REG_NUMBER)

Anil_Babu_Samineni

Sorry to say, syntax is wrong. Should be this


If(YEAR_MONTH_REGISTERED=YEAR_MONTH_CLOSED, 1,0) as flag


And expression is

Count({<flag = {1}>} REG_NUMBER)


Or

COUNT({<YEAR_MONTH_REGISTERED={"=YEAR_MONTH_REGISTERED

=YEAR_MONTH_CLOSED>} REG_NUMBER)

Or finally


Count(if(YEAR_MONTH_REGISTER= YEAR_MONTH_CLOSED, REG_NUMBER))

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful