Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
aarnkalle
Contributor III
Contributor III

How to get a percentage only on a selected fields (not null cases)

Hi

With reference to above subject, I am trying below formula in expressions but getting "Error in Expression".

    (Sum(if(Levels = 'Level*', (Gross),'NA'))) / (sum((if(Levels = 'Level*', total (Gross),'NA'))))

Please see the above and help me to identify where I am making mistake.

Thanks in advance.

Abhijit ARANKALLE.

 

 

11 Replies
aarnkalle
Contributor III
Contributor III
Author

Hi

I cracked it finally, when I used below formula to fetch quarter wise details.

Dual(Year([EncDate])&'-Q'&Num(Ceil(Num(Month([EncDate]))/3)),QuarterStart([EncDate]))

For percentage, I have used below formula -

Sum(Gross)/Sum(TOTAL <[EncDate.autoCalendar.YearQuarter]> Gross)

Also I have loaded only specific AcCodes while loading data instead of all AcCodes so as to avoid NULL values.

Hope this is helpful to all.

Thanks and Regards,

Abhijit ARANKALLE.

sunny_talwar

Awesome