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

problem with map title

Hello I have this map and i would like when i select one or N department i have the % of the Docs:

I used this but it doesn't work :

=If(GetSelectedCount([DepartementsFR.Name])=0,'',[DepartementsFR.Name]&' : '&

Num(Count({<[DepartementsFR.Name]={"$(=Only([DepartementsFR.Name]))"}>}Docs)/Count(ALL Docs),'###0,00%'))

%_1.PNG

%2.PNG

45 Replies
zied_ahmed1
Specialist
Specialist
Author

same value 1073

OmarBenSalem

what about this?

Count(total <[DepartementsFR.Name]> {<[DepartementsFR.Name]>} Docs)


ps: you have departments that are not associated with the existing docs; that's why when u do not select any department, u'll have the total count of the docs existing in ur model

but when u select all departments, u'll only have docs that are associated to ur departments

zied_ahmed1
Specialist
Specialist
Author

Yes same value


I think they will not select all departments so i seems good for me

Thanks a lot

OmarBenSalem

ur model is not well created..

please close the thread

OmarBenSalem

Try this:

count(total{<[DepartementsFR.Name]=p({<[DepartementsFR.Name]>}[DepartementsFR.Name])>} Docs)

and then :

=If(GetSelectedCount([DepartementsFR.Name])=0,'',

GetFieldSelections([DepartementsFR.Name])&' : '& Num(Count(Docs)/

count(total{<[DepartementsFR.Name]=p({<[DepartementsFR.Name]>}[DepartementsFR.Name])>} Docs)

,'###0,00%')

)

zied_ahmed1
Specialist
Specialist
Author

This is the correct answer

Thanks Omar