Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Display diff values for diff rows

headingsub headingvalue
h1sub1 
h1sub2 

 

here need to display values under the value column but sub1 caluculation is diff and sub2 caluculation is diff.

i tried if(table[sub heading] = "sub1",[measure]) i tried this way but am not getting values, these values are coming from another table. how can i achieve it?

  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi Anonymous ,

     

    "sub1 caluculation is diff and sub2 caluculation is diff" -- I have difficult to understand this part. Both the calculation of sub1 and sub2 are diff? What is this "diff"?

    Just look at your measure, maybe you can try the following formula.

    measure = switch(selectedvalue(sub heading),"sub1",[measure],"sub2",[measure2],...)

    https://docs.microsoft.com/en-us/dax/switch-function-dax 

    If I misunderstand your requirement, please share some sample data and expected result to us.

     

    Best Regards,

    Jay

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous ,

     

    "sub1 caluculation is diff and sub2 caluculation is diff" -- I have difficult to understand this part. Both the calculation of sub1 and sub2 are diff? What is this "diff"?

    Just look at your measure, maybe you can try the following formula.

    measure = switch(selectedvalue(sub heading),"sub1",[measure],"sub2",[measure2],...)

    https://docs.microsoft.com/en-us/dax/switch-function-dax 

    If I misunderstand your requirement, please share some sample data and expected result to us.

     

    Best Regards,

    Jay