Qlik Community

Ask a Question

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Welcome to our newly redesigned Qlik Community! Read our blog to learn about all the new updates: READ BLOG and REPORTED ISSUES
cancel
Showing results for 
Search instead for 
Did you mean: 
Creator
Creator

Straight Table Dimension Minus Aggr Dimension

Hi all,

I need to, without putting a flag in the script, subtract the number of days between a dimension field and an aggregated value of that same dimension field.

In the attached example, I'm trying to find the number of days between each sale and the very first sale the employee made. Using aggr to find the first sale for each employee works fine in the first sale column, but when I subtract, it only shows the calculated value on the same row as the initial sale. Is it possible to return the calculated value on each row in the straight table without altering the script?

1 Solution

Accepted Solutions
MVP & Luminary
MVP & Luminary

You could use this as calculated dimension =TX_DATE - date(aggr(NODISTINCT MIN(TX_DATE),EMP))

But you really should use expressions. See attached qvw.


talk is cheap, supply exceeds demand

View solution in original post

2 Replies
MVP & Luminary
MVP & Luminary

You could use this as calculated dimension =TX_DATE - date(aggr(NODISTINCT MIN(TX_DATE),EMP))

But you really should use expressions. See attached qvw.


talk is cheap, supply exceeds demand

View solution in original post

Creator
Creator

This is exactly what I was trying to do. Thanks! I've never used NoDistinct before.