Skip to main content

Power BI

New

Allow use of report-level measures for conditional formatting

Vote (2) Share
Rasmus Ludvigsen's profile image

Rasmus Ludvigsen on 29 Feb 2024 13:51:03

In a nutshell:

As a Report Builder I would like be able to use report-level measures for conditional formatting, since this type of formatting is often very report specific and can clutter up a centralized model. Today report-level measures can't be used in conditional formatting.


Details:

When connected Live to an existing semantic model (aka datamodel) on SSAS or Power BI Service, a report builder - with no access to the central model - has the option to add report-level measures. This is beneficial, but to me a rather important use case for these measures seems to be missing. Report Builders often want to create dynamic titles, colors, icons, or complex conditional formatting via DAX measures to enhance the user experience. Today, conditional formatting in the "fx"-menu can't be based on report-level measures when choosing "Field value". The "Ok" button is greyed out. Only Report Builder with access to the actual model can utilise conditional formatting in full.


Two benefits, if implemented:

  • Empower Report Builders without access to the model, as they will get the full capabilities of conditional formatting and build better reports.
  • Avoid clutter in the model: The formatting-type measures are typically very customized for the report - and can clutter up a central data model that might service multiple reports.
Comments (3)
Rasmus Ludvigsen's profile image Profile Picture

Rasmus Ludvigsen on 26 Jul 2024 21:44:59

RE: Allow use of report-level measures for conditional formatting

@Joel: If what you are sayin' works in my org, then you are an absolute life-saver!Thank you so much for taking the time to explain.

Rasmus Ludvigsen's profile image Profile Picture

Joel Miller on 20 Jun 2024 03:37:16

RE: Allow use of report-level measures for conditional formatting

See Report Level Measures Data Type to default based on return value: https://ideas.fabric.microsoft.com/ideas/idea/?ideaid=e582477a-a276-ee11-a81c-6045bdbdefa6

Rasmus Ludvigsen's profile image Profile Picture

Joel Miller on 20 Jun 2024 03:34:48

RE: Allow use of report-level measures for conditional formatting

It is actually possible to use report-level measures for conditional formatting. The problem appears to be that report-level measures need to have their data type set explicitly – and unfortunately the data type defaults to Decimal number (Double). The measure having a non-text data type is the reason why it can't be used as a Field value. But after changing the Data type to Text in the Measure Tools ribbon tab (after selecting the measure from the Data pane in the Report view), you should be able to use it for conditional formatting. In contrast, measures in a semantic model have their data type inferred from the DAX code and the data types of the columns and other measures that the DAX code references. Therefore, if you write a measure that constructs a text/string value, the Analysis Services engine will almost always infer that the measure has a Text data type. You can actually see these inferred data types in Tabular Editor.