cancel
Showing results for
Search instead 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

Please mark this answer as the solution if it resolves your issue.
Appreciate your kudos! 😊

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

Please mark this answer as the solution if it resolves your issue.
Appreciate your kudos! 😊

## Helpful resources

Announcements

#### The Power BI Community Show

Watch the playback when Priya Sathy and Charles Webb discuss Datamarts! Kelly also shares Power BI Community updates.

#### Ted's Dev Camp - July 28, 2022

Watch Session 24 of Ted's Dev Camp along with past sessions!

#### Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Top Solution Authors
Top Kudoed Authors