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
Anonymous
Not applicable

Combine multiple measures into one

Hi, 

 

I have 4 measure within my table of which outputs 4 different columns with the correct values. What I would like to do is tidy up this table and essentially have these values from the 4 measures, into the one column, but not too sure how I can do that. Is it possible, please?

 

Here are the 4 measures:

 

costing_app = CALCULATE(SUM(fact__dorm_cost[dorm_val]), costing_app_code[exc_status]="Yes")
 
costing_comp = CALCULATE(SUM(fact__dorm_cost[dorm_val]), costing_comp _code[exc_status]="Yes")
 
costing_existing = CALCULATE(SUM(fact__dorm_cost[dorm_val]), costing_existing_code[exc_status]="Yes")
 
costing_set = CALCULATE(SUM(fact__dorm_cost[dorm_val]), costing_set_code[exc_status]="Yes")
1 ACCEPTED SOLUTION

Hi @Anonymous 

Thanks for reaching out to us.

Please try this,

measure=
var _costing_app = CALCULATE(SUM(fact__dorm_cost[dorm_val]), costing_app_code[exc_status]="Yes")
var _costing_comp = CALCULATE(SUM(fact__dorm_cost[dorm_val]), costing_comp _code[exc_status]="Yes")
var _costing_existing = CALCULATE(SUM(fact__dorm_cost[dorm_val]), costing_existing_code[exc_status]="Yes")
var _costing_set = CALCULATE(SUM(fact__dorm_cost[dorm_val]), costing_set_code[exc_status]="Yes")
return switch(true(),
_costing_app<>blank(),_costing_app,
_costing_comp<>blank(),_costing_comp,
_costing_existing<>blank(), _costing_existing,
_costing_set<>blank(), _costing_set)

 

 

Best Regards,

Community Support Team _Tang

If this post helps, please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@Anonymous , The information you have provided is not making the problem clear to me. Can you please explain with an example?

 

You can combine the filters

 

costing_app = CALCULATE(SUM(fact__dorm_cost[dorm_val]), costing_app_code[exc_status]="Yes" , costing_comp _code[exc_status]="Yes" , costing_existing_code[exc_status]="Yes") , costing_set_code[exc_status]="Yes")
Appreciate your Kudos.


Anonymous
Not applicable

This is my test table to show as an example. As you can see, I have the 4 columns, but highlighted in Blue, is what I am after, so I can just had the ID and NEW_COLUMN. 

I have tried your suggestion as above, but the NEW_COLUMN is all blank.

thomas_2583_0-1657188271939.png

 

Hi @Anonymous 

Thanks for reaching out to us.

Please try this,

measure=
var _costing_app = CALCULATE(SUM(fact__dorm_cost[dorm_val]), costing_app_code[exc_status]="Yes")
var _costing_comp = CALCULATE(SUM(fact__dorm_cost[dorm_val]), costing_comp _code[exc_status]="Yes")
var _costing_existing = CALCULATE(SUM(fact__dorm_cost[dorm_val]), costing_existing_code[exc_status]="Yes")
var _costing_set = CALCULATE(SUM(fact__dorm_cost[dorm_val]), costing_set_code[exc_status]="Yes")
return switch(true(),
_costing_app<>blank(),_costing_app,
_costing_comp<>blank(),_costing_comp,
_costing_existing<>blank(), _costing_existing,
_costing_set<>blank(), _costing_set)

 

 

Best Regards,

Community Support Team _Tang

If this post helps, please consider Accept it as the solution to help the other members find it more quickly.

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.