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

GetPossibleCount

i use the   variables    GetPossibleCount(Date) and it works fine 

But when I select a field that is not a date it changes the number of days.
I want it to ignore all fields that are not a date
For example: product name, category name, etc...

I would appreciate your help

 

Labels (4)
4 Replies
JonnyPoole
Employee
Employee

This worked for me. 

 

The symetric difference of:

- All values regardless of any selection {1}

- All values that are NOT included in the associated dates

Count( Distinct {1/<Date=e(Date)>} Date)

 

https://help.qlik.com/en-US/sense/February2024/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/SetAn...

https://help.qlik.com/en-US/sense/February2024/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/SetAn...

 

Vegar
MVP
MVP

Do you expect to select values on Date? Or do you just want to see how many Dates that are available in your selection (but ignoring selections on some fields such as Product and Category?)

 

Consider the image below.

Vegar_0-1712432131779.png

Maybe you could use the GetSelectedCount(Date, -1) instead on getPossibleCount() or maybe you just need to do a regular count, but ignoring the fields you don't want to have an impact on the count by using set analysis. 

Tal43
Contributor II
Contributor II
Author

this is for Inventory Turnover.
my full expression is : (sum(AllNetworkCurrentStock)/sum(Quantity))*$(vTotalDaySelected)
and $(vTotalDaySelected) is my variables: =GetPossibleCount(Date).
but when i chose category fields, The count of days I double is changing because of the new category filter.

I have to make the variable lock only on a date and no other filters

Vegar
MVP
MVP

If you do make selections on the [Date] field then consider using...

GetSelectedCount([Date], True())

...to maintain the original number of dates selected.