cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
TheBaz_57
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
rohit_singh
Solution Sage
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! 😊

View solution in original post

2 REPLIES 2
vojtechsima
Super User
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

 

rohit_singh
Solution Sage
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
Power Platform Conf 2022 768x460.jpg

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.

Power BI Dev Camp Session 23 768x460.jpg

Check it Out!

Mark your calendars and join us on Thursday, June 30 at 11a PDT for a great session with Ted Pattison!

June 20 episode 7 with aka link 768x460.jpg

The Power BI Community Show

Join us on June 20 at 11 am PDT when Kim Manis shares the latest on Azure Synapse analytics, the Microsoft Intelligent Data Platform, and notable Power BI Updates from Microsoft Build 2022.

Top Solution Authors
Top Kudoed Authors