Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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])
Any suggestios please!
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.
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.
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])