Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago

"Show on Rows" not functioning for Matrix

Hi 

I am trying to replicate the logic as it appears in the GIF.

I am developing the functionality through using a matrix table, calculating two measures in PowerBI, and using a non-related filter.

One of the measures is calculating the Preise, and the other one is to calculate the Unit.

The user should have the ability to choose between calculating the rents monthly or per square meter.

The applied logic should be for only one category, which is the property rental and not the other categories i.e it needs to evaluate it at a row context.

Using PowerBI, the logic for calculating the price is working well, but it is not for the Unit.

It would have worked with the use of "show on rows", but that is not working for me.

The calculated Unit measure stays in values but not moving to rows (where it should be) in the Matrix visualisation.

I have tried other alternatives for calculating the Unit using calculated columns but it also did not work.

Now I am out of options.

Here is the DAX for calculating the measure for Unit:

      • Unit =
      • SWITCH(
        • TRUE,
        • SELECTEDVALUE('Filter Selection Calculation Type'[SelectedID])= 2  && SELECTEDVALUE(DimImmoKategorie[ImmoKatID])= 1 ,
        • "CHF/m2 p.a",
        • DimEinheiten[EinheitName]
      • )

Any suggestions on how to make it work or what the issue can be?

Thank you for your guidance.

2 Replies

  • vanessafvg's avatar
    vanessafvg
    Community Champion

    Its hard to evaluate the problem without some data.  Can you please share more information?  Providing a pbix or dummy data will be useful in helping you to resolve the issue.

  • v-jingzhang's avatar
    v-jingzhang
    Community Support

    Hi Anonymous 

     

    If you put only one measure in Values of a matrix, the "Show on rows" feature will not work. It works when you put multiple measures or fields in Values. Then the result of these fields will be displayed on rows instead of columns.

     

    Regards,
    Community Support Team _ Jing
    If this post helps, please Accept it as the solution to help other members find it.