Forum Discussion

hardeep991100's avatar
hardeep991100
New Member
6 months ago
Solved

How to conditional format the x axis label value?

 

My target is to only show initial and last values else in blank/disappear. So thought, as there is fx button (shown in the image), i made calculate measure for first and end value and then do conditional format which will color my first and last x axis label blue and rest will be white in color, but is not working as normally how conditional format works? Any idea or place to look for?

  • Hi hardeep991100,

    Conditional formatting on the X-axis is a known issue that has been reported multiple times ( https://community.fabric.microsoft.com/t5/Issues/Axis-value-color-conditional-formatting-not-working/idc-p/4993494#M112893 ) but has not yet been fixed. Based on the DAX query generated by a line chart, X-axis conditional formatting is evaluated without respecting row context. As a result, the formatting is applied across all visible rows rather than per row.

    Because the conditional formatting measure is evaluated over all visible rows, using logic such as SELECTEDVALUE returns a blank result for the entire set, causing the axis color to fall back to the default. However, if a field value that does not depend on row context (for example, a constant value like "blue") is used, the X-axis color is applied correctly.

    In the image below, the first line chart’s X-axis uses Color2 as the field value, while the second uses Color1.

3 Replies

  • Hi hardeep991100,

    Conditional formatting on the X-axis is a known issue that has been reported multiple times ( https://community.fabric.microsoft.com/t5/Issues/Axis-value-color-conditional-formatting-not-working/idc-p/4993494#M112893 ) but has not yet been fixed. Based on the DAX query generated by a line chart, X-axis conditional formatting is evaluated without respecting row context. As a result, the formatting is applied across all visible rows rather than per row.

    Because the conditional formatting measure is evaluated over all visible rows, using logic such as SELECTEDVALUE returns a blank result for the entire set, causing the axis color to fall back to the default. However, if a field value that does not depend on row context (for example, a constant value like "blue") is used, the X-axis color is applied correctly.

    In the image below, the first line chart’s X-axis uses Color2 as the field value, while the second uses Color1.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi hardeep991100,

     

    Thank you for reaching out to the Microsoft Fabric Forum Community, and special thanks to danextian  for prompt and helpful responses.

    Just following up to see if the Response provided by community members were helpful in addressing the issue. if the issue still persists Feel free to reach out if you need any further clarification or assistance.

     

    Best regards,
    Prasanna Kumar

     

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi @hardeep991100,

     

    Just following up to see if the Response provided by community members were helpful in addressing the issue. if the issue still persists Feel free to reach out if you need any further clarification or assistance.

     

    Best regards,
    Prasanna Kumar