Forum Discussion
Rank the duplicates values
- 5 years ago
Hi Paulshap
You could create a new calculated table:
New table = GENERATE ( DISTINCT ( Table1 ), GENERATESERIES ( 1, CALCULATE ( COUNT ( Table1[sale_contract_id] ) ) ) )Otherwise perhaps you can create the equivalent of the calculated table in PQ and add an index afterwards.
I don't think it is possible to add a column like that directly in DAX (witout creating a new table) since there is nothing to differentiate the duplicates. In any case, what is the point of this? What are you trying to do, ultimately? Most likely it can be done without that column, since it doesn't seem to add any information.
Please mark the question solved when done and consider giving a thumbs up if posts are helpful.
Contact me privately for support with any larger-scale BI needs, tutoring, etc.
Cheers
Hi Paulshap
You could create a new calculated table:
New table =
GENERATE (
DISTINCT ( Table1 ),
GENERATESERIES ( 1, CALCULATE ( COUNT ( Table1[sale_contract_id] ) ) )
)
Otherwise perhaps you can create the equivalent of the calculated table in PQ and add an index afterwards.
I don't think it is possible to add a column like that directly in DAX (witout creating a new table) since there is nothing to differentiate the duplicates. In any case, what is the point of this? What are you trying to do, ultimately? Most likely it can be done without that column, since it doesn't seem to add any information.
Please mark the question solved when done and consider giving a thumbs up if posts are helpful.
Contact me privately for support with any larger-scale BI needs, tutoring, etc.
Cheers
AlB thanks a lot. It works!😁 Regarding the aim - I had the parent table with unique agreement where it was displayed period of agreement( e.g. 3 months ),amount by agreement and % by this amount. I have to show the % proportionately the period (3 mon) with displaying date in frame of start date and end date of agreement. I multiplied the agreement and need some index to increment the dates in frame of agreement. The final result should look like http://prntscr.com/xagiki