Forum Discussion
How to set Layout property into the theme file for Default stylePreset for Matrix Visual
- 1 year ago
Hi modi123p - you must set this tabular layout manually in matrix visual available at formatting pane > Layout and style presets > Tabular yu can choose layout with tabluar. The "stylePreset" property you tried does not control the layout via theme it is not supported as of now.
for color thems, Use report themes in Power BI Desktop - Power BI | Microsoft Learn you can find more insightful on the above link.
Hope it helps.
- 1 year ago
v-kpoloju-msft Any place we can refer all supported attributes from MS (in MS Docs)?
I found the schema on GitHub. But is this the one to be referred to?
Hi modi123p,
Thank you for reaching out to the Microsoft fabric community forum. Also thanks to burakkaragoz, rajendraongole1, for those valuable insights on this issue. Here I mentioned workaround that might be resolve the issue. Please have a look into it.
Power BI does not allow setting the Matrix layout (Tabular, Outline, or Stepped) as a default via the theme file or report settings. The “Tabular” layout option you’re referring to is a visual-level format setting, and unfortunately, it is not something that can be controlled programmatically or through JSON themes right now.
To apply the Tabular layout, you will need to:
- Select the Matrix visual.
- Go to the Format pane.
- Expand Layout and style presets.
- Change the Layout option Tabular manually.
After you manually change the option to Tabular, save the file and close Power BI Desktop. When you reopen Power BI Desktop, it will display only the Tabular option.
You would need to do this for each Matrix visual individually. A potential workaround is to set up a Matrix the way you want (with Tabular layout, repeat headers, etc.) and then copy that visual throughout the report as a template.
If this post helps, then please give us ‘Kudos’ and consider Accept it as a solution to help the other members find it more quickly.
Thank you for using Microsoft Community Forum.