Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

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 meas...
  • v-xiaotang's avatar
    v-xiaotang
    4 years ago

    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.