Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
wcoleman0908
Partner - Contributor III
Partner - Contributor III

How do I show the results of a COUNT(DISTINCT ID) inside a text field in Qlik Sense ?

Get_KPI:

LOAD count(distinct ID) as vKPI

From [Lib://location/source.qvd] (qvd)

;

Create a Text object to show the variable $(vKPI) value returned.

It is my intent to then share this on a SharePoint webpart along with other KPI variables as requested.

Labels (1)
1 Solution

Accepted Solutions
MarcoWedel

In your example vKPI is a field rather than a variable.

Can you try just using =vKPI instead of $(vKPI) in your text object?

View solution in original post

3 Replies
Lisa_Sun
Support
Support

Example:

 

SET vKPI='';


Get_KPI:

LOAD count(distinct ID) as vID
Resident Transactions
;

LET vKPI=peek('vID');

 

In the text object, you can inset the expression as ='$(vKPI)'
 

Help users find answers! Don't forget to mark a solution that worked for you! If already marked, give it a thumbs up!
MarcoWedel

In your example vKPI is a field rather than a variable.

Can you try just using =vKPI instead of $(vKPI) in your text object?

Sabrina_V
Partner - Creator II
Partner - Creator II

Hello,

Like @MarcoWedel  said, vKPI is a field not a variable.

In the text you need to add a measure like this  : sum(vKPI).

If you want to add some descritive, add a measure and type : '<your text> ' & Num(Sum(vKPI),'#,##0.00'  )