Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Lionel_Maximus
Contributor III
Contributor III

One To Many Count

Hello Everyone,

I have two fields Username & FarmerName. There's one to many relationship(User To Farmers). Now i want to visualize the number of times a User(Username) visited a farmer with dates . How to do that??......Username has ID column too and There's a date coulmn as well.

Data Sample File Attached

Thanks

2 Replies
mikaelsc
Specialist
Specialist

create a counter field in both tables... 

1 AS _FarmerCounter

in farmers table

 

1 as _FarmerVisit

in visits table. 

 

sum(_FarmerCounter) for the number of farmers

sum(_FarmerVisit) for the number of visits. 

 

obviously, tables need to be associated (farmer ID?) ... no duplicates, no joins,... 

JordyWegman
Partner - Master
Partner - Master

Hi Lionel,

You can make a pivot table:

Dimension 1: UserName

Dimension 2: FarmerName

Measure 1: Count(FarmerName)

This way you will get the number of times a user visited a farmer.

 

Jordy

Climber

Work smarter, not harder