Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Grouping continuous measure into groups in DirectQuery

Hi,   I have the following below which I want to make group based on % so: What I have: What I'm looking for:   NOTE: This has to be implemented in a DirectQuery context!   I ...
  • v-xiaotang's avatar
    v-xiaotang
    4 years ago

    Hi Anonymous 

    I'll test it later under DQ mode, before that, do you have dimension table containing groups?

    If not, you need to use switch() to get the expected outcome.

    -

    Update:

    create the measure below

    group = 
    var _value=[Measure]
    return SWITCH(TRUE(),
    _value>0&&_value<=0.25,"0 % - 25 %",
    _value>0.25 && _value<=0.5,"25 % - 50 %")

     

    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.