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

How to have fixed/static dimension?

Hi All, 

I have 3 columns in my mock up data. i.e. Unit, Epi_month, Name. 

I plotted them on a graph, dimension: Epi_month, measures: Count(distinct name)

I have a filter: Unit. 

Capture.PNG

When i filter for a unit, the graph and dimension reduces to:

Capture2.PNG

Is there anyway I can continue to show -11 to 10 in the dimension. So those missing values are shown as 0 in the graph?

Edit: attaching my mock up data as well.

1 Solution

Accepted Solutions
rubenmarin

or maybe:
Sum({1} aggr(count(Name), Epi_month))

View solution in original post

6 Replies
benvatvandata
Partner - Creator II
Partner - Creator II

See if changing your measure to this works:

count({1} aggr( count([distinct name]), Epi_month))

 

- Ben

rubenmarin

or maybe:
Sum({1} aggr(count(Name), Epi_month))
newmcm
Contributor
Contributor
Author

Hi, is this for the measure or dimension?
newmcm
Contributor
Contributor
Author


@benvatvandata wrote:

See if changing your measure to this works:

count({1} aggr( count([distinct name]), Epi_month))

 

- Ben


Wouldn't this makes my filter for useless already? 

newmcm
Contributor
Contributor
Author


@rubenmarin wrote:
or maybe:
Sum({1} aggr(count(Name), Epi_month))

Thanks! this works wonder! 

Would you be able to explain the rational/logic behind please?

 

rubenmarin

Hi, it counts Name's for each Epi_month, all inside a sum to keep the value ofthe insider Sum, and using {1} to ignore selections and allow to show all dimension values.

It's very similar to the one posted by @benvatvandata, just changed the Count by a Sum, because the count will return 1, but the sum keeps the value of the insider Count().