Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello!
I have 2 transaction tables (Sales,Prognoz in attachment) . They include different type of clients (Client - Client_main).
Mapping table for Client - Client_main in attachment too.
Else, i have table for client classes.
I create data model from this xls files. For example,It has few same rows (prognoz in transactions) for 1 main client, because one main client mapping for few clients.
I want, that expression for prognoz working correctly. Now, in attachment app. it increases threefold

How can i fix it?
Thank you for your reply!
Anton Aleksandrov.
May be this
=Sum({<Type_Of_Transaction = {"Prognoz"}>} Account)/Count(DISTINCT Class)
Hi Aleksandrov,
have You trie Sum( DISTINCT value) ?
Regards,
Antonio
Hello! Yes, i tried this, but on a lot of data it works very slowly.
How about this?
=Sum({<Type_Of_Transaction = {"Prognoz"}>} Account)/Count(DISTINCT Class)
Hello, Sunny!
I have flex table to this and It is not working correctly in other selections. (and dimensions)


I have flex table to this
What is a flex table?
I mean table, that i load in script via inline load.
After that, i use this table to choose dimensions(show condition) in "Straight table".
I have solution (working very slowly) with using DISTINCT:
IF(Dimensionality() = 0,
Sum(Aggr(Sum(DISTINCT {<Type_Of_Transaction = {"Prognoz"}>} Account),Client_main,Product)),
Sum(Aggr(Sum(DISTINCT {<Type_Of_Transaction = {"Prognoz"}>} Account),Client_main,Product,!!! dimensions in table !!! ))
