Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikWorld, June 24-25, 2020. Free virtual event for DI and DA gurus. Register Today
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor III
Contributor III

Calculated Dimension and Only(), Total not working

Hi All,

I have data as below: and App is attached, PFB.

Details_table:

Employee,    Subject,    Status
aaa,                 English,     Completed
aaa,                 Hindi,         OverDue
aaa,                Marathi,      NotOverDue
aaa,                French,       NotRequired
xyz,                 Math,           NotOverDue
cde,                Science,      Completed
nmo,              Bangla,        OverDue
nmo,              English,       Completed

Description for : Status Consideration/calculation in UI

Status is categorized as  into two categories,  Completed & NotCompleted.

(Employee whose Subject status is Completed is Completed,  and no need of calculated% to show in UI/Chart

Employee whose Subject status is Overdue, NotOverdue come under NotCompleted, % to show

Employee whose Subject status is NotRequired is not considered at all. )

Completed=Completed,  NotCompleted= 'Overdue', 'NotOverDue'

% for NotCompleted= Employee with status Overdue,NotOverDue/Employee with status Complete,Overdue,NotOverDue

Expected Output is:

Employee| Status| %

cde|Completed|

nmo|NotCompleted|50%

aaa|NotCompleted|66%

xyz|NotCompleted|100%

 

 

Thanks In Advance! Help is appreciated 🙂

 

Thanks & Regards,

Heena Kauser

 

6 Replies
Highlighted
Partner
Partner

Re: Calculated Dimension and Only(), Total not working

Hi

try to see file attached

Highlighted
MVP
MVP

Re: Calculated Dimension and Only(), Total not working

Try:

=Aggr(If(Count({<Status={'Completed'}>}Status)=Count(Status), 'Completed', 'Not Completed'),Employee)
Highlighted

Re: Calculated Dimension and Only(), Total not working

The 'Details' chart in your expression was incorrectly using the field name as status instead of Status.. changing that, changed the output of the table

image.png

Knowing this, do you change the expected output, or would you still want to see 0 for cde?

Highlighted
Contributor III
Contributor III

Re: Calculated Dimension and Only(), Total not working

Hi Sunny,

By mistake I might have used the field name as status instead of Status. Sorry,My Bad!

The requirement remains the same.

 

 

Thanks & Regards,

Heena Kauser

Highlighted
Contributor III
Contributor III

Re: Calculated Dimension and Only(), Total not working

Hi,

 

 If I filter on the completed records in Status, NotCompleted records are also visible.

Only Completed should be visible.

 

Thanks & Regards,

Heena Kauser

 

 
Highlighted

Re: Calculated Dimension and Only(), Total not working

So, cde completed should be 0? Why?