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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Krish2459_58
Creator II
Creator II

frist row

Hi,

I need to show only the firtst row of each property code in the below table.

Logic used:

avg({<L_D_TYPE={'Current'}>+<P_D_TYPE={'Current'}>+<LRR_D_TYPE={'Current'}>+<SL_D_TYPE={"Current"}>+<SLRR_D_TYPE={"Current"}>}[Property Code])

Krish2459_58_1-1713112830995.png

 

 

Labels (1)
4 Replies
Krish2459_58
Creator II
Creator II
Author

Any suggestios please!

Rohan
Partner - Specialist
Partner - Specialist

Hi @Krish2459_58 , 

Do all the property attributes belong to different tables or a single fact table ? If they are from different tables, try to join them in to a single table. This way you will have a single row for each property code.

Also why are you calculating Avg(Property_Code) anyways ?

 

Regards,

Rohan.

marcus_sommer

It's not really clear what do you want to achieve? It seems that you are trying to apply a set analysis condition which is quite the same as a selection to get a multi-level aggregation and which needs any comparing on a row-level. If so you will need (nested) if-loops to check the multiple flag-fields against each other as well as to enable them on a row-level and/or any kind of counting the TRUE checks.

Although not knowing your data-set, data-model and the requirements I could imagine that I wouldn't use multiple flags in a crosstable-structure else transforming them into a streamdata-structure and/or applying a hierarchically structure to them - this means to move your n flag-fiels into two fields. One has the value and the other the name of it.

Anil_Babu_Samineni

I would suggest generating a RowNo() for property code and use that into analysis. Like

Autonumber (IterNo(), [propety code]) as Seq_propety_code // this will generate the sequence in the form of ascending. 

Expression is below, 

avg({<Seq_propety_code={1}, L_D_TYPE={'Current'}>+<Seq_propety_code={1}, P_D_TYPE={'Current'}>+<Seq_propety_code={1}, LRR_D_TYPE={'Current'}>+<Seq_propety_code={1}, SL_D_TYPE={"Current"}>+<Seq_propety_code={1}, SLRR_D_TYPE={"Current"}>}[Property Code])

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful