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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
SteveKingdon
Frequent Visitor

Calculated Measures and CPMU calculations

Hi,

I am new here and to BI, and I am looking for some help.

 

I am trying to use a calculate measure to calculate a complaints per million units figure.

One of the values being used is pulled form an SQL report and the other is a calculated measure I have set up. How ever I can not see the calculated measure when using the DAX formula to create the CPMU calculation.

My question is can you use a calculated measure in another calculated measure or is this to complex?

If you can not how can I calculate one number to then be used in a further calculation.

 

The CPMU calculation I am using is 

CPMU = divide(sum(Complaints[Number Of Complinats]),divide(sum(calculated measure),1000000))

 

Any help appreciated.

 

Steve

1 ACCEPTED SOLUTION
V-lianl-msft
Community Support
Community Support

Please try :

CPMU = 
var divide_1 = divide(calculated measure,1000000)
return divide(sum(Complaints[Number Of Complinats]),divide_1)

 If you want to sum measure, use sumx instead of sum.

CPMU = 
var divide_1 = divide(SUMX ( VALUES ( Complaints[xxxx] ), [calculated_measure] ),1000000)
return divide(sum(Complaints[Number Of Complinats]),divide_1)

View solution in original post

1 REPLY 1
V-lianl-msft
Community Support
Community Support

Please try :

CPMU = 
var divide_1 = divide(calculated measure,1000000)
return divide(sum(Complaints[Number Of Complinats]),divide_1)

 If you want to sum measure, use sumx instead of sum.

CPMU = 
var divide_1 = divide(SUMX ( VALUES ( Complaints[xxxx] ), [calculated_measure] ),1000000)
return divide(sum(Complaints[Number Of Complinats]),divide_1)

Helpful resources

Announcements
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.