Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
mborsadw
Partner - Creator
Partner - Creator

Show Part (as a dimension) corresponding to Min Value in a Pivot/Straight Table

clipboard_image_0.png

In the 2nd straight table, I want to display the dates and the Min Value across all parts for that date and the Part corresponding to the Min Value for that date.

I am able to do it as shown above but the Parts are displayed as Measures and thus are not selectable. I would like to click on a particular part in the table (highlighted in yellow) thus filtering the dataset to that part.

Is this possible?

QVF is attached.

Labels (1)
1 Solution

Accepted Solutions
karthiksrqv
Partner - Creator II
Partner - Creator II

Hi,

If in the straight table, we use Dt and Part as dimensions and

"

if(
sum(Value)=
min(Total <Dt> aggr(sum(Value),Dt,Part,Group)),
sum(Value),
0
)

" as the measure with suppress zero value. Would it work?

View solution in original post

6 Replies
asinha1991
Creator III
Creator III

create  a dimension as below

=aggr(firstsortedvalue(Part, Value), Dt)

mborsadw
Partner - Creator
Partner - Creator
Author

clipboard_image_0.png

I do see the part numbers as dimensions with your approach. But when I select the part number, it makes a selection on Dates as seen in the above screenshot.

asinha1991
Creator III
Creator III

This selects both dt and part

=if(aggr({1}rank(-sum(Value)),Dt,Part)=1,Part)

 

hopefully there is a better way

 

mborsadw
Partner - Creator
Partner - Creator
Author

@sunny_talwar any other approach?

karthiksrqv
Partner - Creator II
Partner - Creator II

Hi,

If in the straight table, we use Dt and Part as dimensions and

"

if(
sum(Value)=
min(Total <Dt> aggr(sum(Value),Dt,Part,Group)),
sum(Value),
0
)

" as the measure with suppress zero value. Would it work?

shdhara_zyme
Partner - Contributor II
Partner - Contributor II

Hi,

Have incorporated the logic in the load script, hope this helps

Regards

Shashi