cancel
Showing results for
Did you mean:
Frequent Visitor

## Can this 3 calculations can be done in one ?

Hi all,

I have this 3 calculation:

Coll.V. 1S = CALCULATE(SUM('Master June 2021'[Value (USD)]),'Master June 2021'[Nb Liquidity Sources]=1)
Coll.V. 2S = CALCULATE(SUM('Master June 2021'[Value (USD)]),'Master June 2021'[Nb Liquidity Sources]>=2)/2

Real = 'Master June 2021'[Coll.V. 1S]+'Master June 2021'[Coll.V. 2S]

Can this be done in one shot?

Thanks
1 ACCEPTED SOLUTION
Solution Sage

Hi @TheBaz_57 ,

Please create a new measure and try this :

Real =

var _Coll.V.1S = CALCULATE(SUM('Master June 2021'[Value (USD)]),'Master June 2021'[Nb Liquidity Sources]=1)
var _Coll.V.2S = CALCULATE(SUM('Master June 2021'[Value (USD)]),'Master June 2021'[Nb Liquidity Sources]>=2)/2

RETURN
_Coll.V.1S+_Coll.V.2S

Kind regards,

Rohit

2 REPLIES 2
Super User

Hi, @TheBaz_57 ,
Sure, basically you just put "var" as a variable in front of each name and return it by calling one of the variable.

``````var Coll.V. 1S = CALCULATE(SUM('Master June 2021'[Value (USD)]),'Master June 2021'[Nb Liquidity Sources]=1)
var Coll.V. 2S = CALCULATE(SUM('Master June 2021'[Value (USD)]),'Master June 2021'[Nb Liquidity Sources]>=2)/2

var Real = 'Master June 2021'[Coll.V. 1S]+'Master June 2021'[Coll.V. 2S]
return Real``````

Solution Sage

Hi @TheBaz_57 ,

Please create a new measure and try this :

Real =

var _Coll.V.1S = CALCULATE(SUM('Master June 2021'[Value (USD)]),'Master June 2021'[Nb Liquidity Sources]=1)
var _Coll.V.2S = CALCULATE(SUM('Master June 2021'[Value (USD)]),'Master June 2021'[Nb Liquidity Sources]>=2)/2

RETURN
_Coll.V.1S+_Coll.V.2S

Kind regards,

Rohit

Announcements