cancel
Showing results for 
Search instead for 
Did you mean: 

WEBI summing distinct values

0 Kudos

Dear all

Let us say I have a table as the below :

In my case if the project_id is the same , the last_total cost will always be the same. If I remove the Reference, the Last total cost will be aggregated as below :

However I wish to SUM all last total cost ONLY for distinct Project_id so in this example I would want the result to be

100 96.65

I have tried a combination of using IN clause but I can't seem to get it right. On Microsoft BI I had to create two variables but in the end I got what I wanted. Can someone pls help a newbie WEBI user pls ?

Last total cost is a measure.

Tnx

konrad

Accepted Solutions (0)

Answers (3)

Answers (3)

0 Kudos

Dear all,

Thanks for your answers.

They both work.

amitrathi239
Active Contributor
0 Kudos

other way to achieve this is:

create dimension variable on Last Total Cost object as " V Last Total Cost".

Final variable=max([V Last Total Cost]) in ([Project Id])

Tom_N8
Contributor
0 Kudos

Hi Konrad,

Create a variable with [Last Ttl Cost] =If(Count([Reference]) In([Project Id]) >1) Then ([Last Total Cost]/Count([Reference])) Else [Last Total Cost]

Kind regards,

Tom