Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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%'))
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%')
)
I don't understand the additional ONLY statement when working out the percentage, you need the calculation to work against selected departments which would just be a standard Count(Docs) statement.
To get all selected values in the title you can use the GetFieldSelections() function.
Take a look expression below and example attached;
=If(GetSelectedCount([DepartementsFR.Name])=0,'',GetFieldSelections([DepartementsFR.Name])&' : '&
Num(Count(Docs)/Count(ALL Docs),'###0,00%'))
Hello,
Thanks you for your time,
The problem is when i select all departments i have this :
I need to have 100 % ...
I would take a look at the underlying data, are there Docs without a DepartmentFR.Name?
Try changing your ALL to TOTAL, this should ensure all Docs without a department are not taken into account;
=If(GetSelectedCount([DepartementsFR.Name])=0,'',GetFieldSelections([DepartementsFR.Name])&' : '&
Num(Count(Docs)/Count(TOTAL Docs),'###0,00%'))
Hello,
I tried this me too but it doesn't work,it display 100%.
omarbensalem stalwar1 they could help us
create a text object; put as a measure:
GetSelectedCount([DepartementsFR.Name])
do not select anything, see what it shows;
then select :
one or 2 departements and see what it shows;
let this be our first test
what if u do not select a thing?
the result is 0