Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Memorable Member
Memorable Member

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.