Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
vchuprina
Specialist
Specialist

Row count in mapping table

Good Morning,

I understand that Mapping table is hard coded table and we can simply count number of row manually. But Is it possible to get row count of the mapping table by using Qlikview?


For example table below:


CityMap:

  Mapping LOAD * Inline

  [

  City_Name, CITY_NUM

  PARIS, 6

  LONDON, 4

  LA, 347

  SEATTLE, 11

  CHICAGO, 12

  ];

  ENDIF

Press LIKE if the given solution helps to solve the problem.
If it's possible please mark correct answers as "solutions" (you can mark up to 3 "solutions").
1 Solution

Accepted Solutions
sunny_talwar

May be this:

TempCityMap:

  LOAD * Inline

  [

  City_Name, CITY_NUM

  PARIS, 6

  LONDON, 4

  LA, 347

  SEATTLE, 11

  CHICAGO, 12

  ];

RowCount:

LOAD Count(City_Name) as RowCount

Resident TempCityMap;

CityMap:

Mapping

LOAD City_Name,

          CITY_NUM as City_Num

Resident TempCityMap;

DROP Table TempCityMap;

View solution in original post

8 Replies
sunny_talwar

May be this:

TempCityMap:

  LOAD * Inline

  [

  City_Name, CITY_NUM

  PARIS, 6

  LONDON, 4

  LA, 347

  SEATTLE, 11

  CHICAGO, 12

  ];

RowCount:

LOAD Count(City_Name) as RowCount

Resident TempCityMap;

CityMap:

Mapping

LOAD City_Name,

          CITY_NUM as City_Num

Resident TempCityMap;

DROP Table TempCityMap;

markodonovan
Specialist
Specialist

Hi there,

You could also add the count into a variable as follows:

LET TableCount = NoOfRows('TempCityMap');

--Update This would need to be used on the TempCityMap table as in Sunny's example.

Thanks

Mark

http://techstuffybooks.com

sunny_talwar

I just tried it with a sample app, doesn't seem to be working with Mapping LOAD.

sunny_talwar

Naresh‌, logfile does seem to have the row count information for Mapping Load

Capture.PNG

markodonovan
Specialist
Specialist

Hi Sunny,

My mistake,

I just copied your TempCityMap and just realized it wasn't a mapping load.


Thought I was missing something about the question.


Mark

sunny_talwar

No problem.

In full disclosure I had no idea if NoOfRow('TableName') would work or not, but would have been glad if it did

NareshGuntur
Partner - Specialist
Partner - Specialist

Thanks Sunny.

Somehow, I missed it.

Anonymous
Not applicable

=count(City_Name)