Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
Coming your way, the Qlik Data Revolution Virtual Summit. October 27-29. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor
Contributor

Creating a COUNTIFS with multiple variables in Qlikview

Hello! I am very new to Qlikview and am trying to do recreate a formula that I typically do in Microsoft Excel. I have a table that looks like something below:

 COL ACOL BCOL CCOL D
ROW 1SKURegionManagerRegion Manager Count
ROW 2SKU1USJoe2
ROW 3SKU1EUHarry2
ROW 4SKU2ASIARandy2
ROW 5SKU2USMike1
ROW 6SKU2CANNathan1
ROW 7SKU3USJoe2
ROW 8SKU4EUHarry2
ROW 9SKU4ASIARandy2

 

The Excel version of the formula I have in Column D is:  =COUNTIFS(B:B,B2,C:C,C2). Is there a way to create an expression in a Chart that does the same thing in Qlikview? Thank you!

3 Replies
Highlighted
Master II
Master II

When loading your data, create a new field:
Region & '|' & Manager as key_Region_Manager,

After loading your data, something like this:

Temp:
Noconcatenate
load
     key_Region_Manager,
     count(key_Region_Manager) as Reg_Mgr_Cnt
resident Data
group by key_Region_Manager;

Then:
left join(Data)
load *
resident Temp;

drop table Temp;

Highlighted

Hi, you can try with: Count(TOTAL <[COL B], [COL C]> [COL C])

Highlighted
Digital Support
Digital Support

Khandker, did either of the poster's comments help you get things working?  If so, please consider using the Accept as Solution button to give them credit for the effort.  If you did something else, you can share that as well and mark that as the solution as well.

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.