Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
tchovanec
Creator II
Creator II

Limit chart value using expression

I am trying to only show records that have a percent value over 5% and then show the top 10 sorted by total. I have tried using dimension limits and it doesn't give the the result I am expecting. I have attached the application and you will notice the chart is showing the top 10 by total, but there are records that have less than 5% showing. I would like this chart sorted by Total and only shows the 10 where the % is greater than 5%. Any help would be greatly appreciated. Thank you

6 Replies
cspencer3
Creator II
Creator II

You may want to take down that example and scramble the PHI. I believe MRN counts as PHI under HIPAA.

To solve the issue you could use the Show Values 'Greater Than' 5% relative to total. But this would show over 10 categories if there are over ten values that are greater than 5% of the total. In your example there are not.

MK_QSL
MVP
MVP

Use expression as below

IF(COUNT(DISTINCT

{<

FLG_POSTED_CHARGES_WITHIN_4_DAYS = {0},

DateType = {'TX_POST_DATE'},

TX_POST_DATE = P(DATE),

FLG_OSU_COST_CENTER = {0}

>}TX_ID)

/

COUNT(DISTINCT{<

DateType = {'TX_POST_DATE'},

TX_POST_DATE=P(DATE),

FLG_OSU_COST_CENTER = {0}

>}

TX_ID) >= 0.1,

COUNT(DISTINCT

{<

FLG_POSTED_CHARGES_WITHIN_4_DAYS = {0},

DateType = {'TX_POST_DATE'},

TX_POST_DATE = P(DATE),

FLG_OSU_COST_CENTER = {0}

>}TX_ID))

and

IF(COUNT(DISTINCT

{<

FLG_POSTED_CHARGES_WITHIN_4_DAYS = {0},

DateType = {'TX_POST_DATE'},

TX_POST_DATE = P(DATE),

FLG_OSU_COST_CENTER = {0}

>}TX_ID)

/

COUNT(DISTINCT{<

DateType = {'TX_POST_DATE'},

TX_POST_DATE=P(DATE),

FLG_OSU_COST_CENTER = {0}

>}

TX_ID)>=0.1, COUNT(DISTINCT

{<

FLG_POSTED_CHARGES_WITHIN_4_DAYS = {0},

DateType = {'TX_POST_DATE'},

TX_POST_DATE = P(DATE),

FLG_OSU_COST_CENTER = {0}

>}TX_ID)

/

COUNT(DISTINCT{<

DateType = {'TX_POST_DATE'},

TX_POST_DATE=P(DATE),

FLG_OSU_COST_CENTER = {0}

>}

TX_ID))

tchovanec
Creator II
Creator II
Author

Thanks for noticing the MRN. I thought I scrambled all the PHI. I have taken that down and uploaded one with MRN scrambled.

tchovanec
Creator II
Creator II
Author

Charles I tried this and when I change to use the Show Values 'Greater Than' 5% relative to total, cost centers with less than 5% still show up.

tchovanec
Creator II
Creator II
Author

Manish,

This is not working. Giving me -%'s for most of the numbers

Not applicable

Hi Tom,

I think you can do something like

if(percentage > .05,

expression)

in both your total and percentage expressions that should work.

-Ray