Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Independent validation for trusted, AI-ready data integration. See why IDC named Qlik a Leader: Read the Excerpt!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Get value from Pivot table (Pls help)

Dear all,

still no idea how do to it, so I would like to ask the community.

I'd like to get the a value which is associated to a certain percentage. With a pivot table I am able to get the value, but it is just half way. Please see attached QV-file, because it shows the problem/question in a more demonstrative way then explaining the issue.

Hope someone will be able to assist me. Thanks. [:D]

Nico

1 Reply
Not applicable
Author

Ok I had another night of no sleep but thinking of how to do this ... and end up with no result.

Maybe some more details are helpful:

The main dataset (one year) consists of fields with: Weekday (Monday, so there are 52 days in this example), Date (DD.MM.YYYY), Date with hour (one row for each hour in the year, DD.MM.YYYY hh), Hour (00:00 - 23:00), Value (0 - 17).

In a pivot table I use Hour and Value as dimensions and count the number of days per Hour and Value.

count (distinct Date)


In the next step I calculate the percentage of the days (from 52).

count (distinct Date)/52


followed by the cumulative description of the percentage("all").

If(Above("all")>0, Above("all") + (count (distinct Date)/52), (count(distinct Date)/52))


That works fine so far, but the question is: Is it possible to do that calculation in the script?