Forum Discussion

人才's avatar
人才
New Member
5 months ago
Solved

Parameter: Selected Value doesn’t updated

I want the colour of the bar changes when report users input the date of previous meeting held. Here’s the steps I did:

1. ⁠Create Parameter for Month and Day

2. ⁠Create a custom column for comparing the data date and meeting date. The meeting date is date(2026, parameter month, parameter day)

The issue here is, the selected value of the parameter table doesn’t update when the parameter slicers change (see the parameter slicers vs DAX of selected value in the bottom), hence the colour of the bars remains unchanged. P.S. if I manually edit the DAX of the selected value, the colour of the bars change.

  • Hi grazitti_sapna 

    The issue occurs because calculated columns are evaluated only during data load or refresh. They do not respond dynamically to slicer selections in the report view, which is why SELECTEDVALUE is not updating your column.

    To resolve this, you must use a Measure instead of a calculated column. Follow these steps:

    Delete the custom calculated column you created.

    Create a new Measure with the following DAX, replacing 'YourDataTable'[Date] with the actual date column used in your X-axis, and adjusting the hex color codes as needed:

    קטע קוד
    Bar Color Measure =
    VAR SelectedMonth = SELECTEDVALUE('Previous Meeting (Month)'[Previous Meeting (Month)])
    VAR SelectedDay = SELECTEDVALUE('Previous Meeting (Day)'[Previous Meeting (Day)])
    VAR MeetingDate = DATE(2026, SelectedMonth, SelectedDay)
    VAR CurrentBarDate = MAX('YourDataTable'[Date])
    RETURN
    IF(CurrentBarDate >= MeetingDate, "#0000FF", "#ADD8E6")
    Select your bar chart, go to the Format pane, and open the Columns (or Data colors) settings.

    Click the conditional formatting (fx) button next to the color.

    Set the Format style to Field value and select the [Bar Color Measure] you just created.

    The bar colors will now dynamically update whenever the parameter slicers are changed. For more organized and specific assistance, please share a sample file and an image of the expected result via a public cloud storage link.

    If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly

4 Replies

  • Hi 人才 ,

     

    Instead of creating a calculated column, Please try with measure instead, if it doen't work, Kindly share the sample data.

     

    🌟 I hope this solution helps you unlock your Power BI potential! If you found it helpful, click 'Mark as Solution' to guide others toward the answers they need.
    💡 Love the effort? Drop the kudos! Your appreciation fuels community spirit and innovation.
    🎖 As a proud SuperUser and Microsoft Partner, we’re here to empower your data journey and the Power BI Community at large.
    🔗 Curious to explore more? [Discover here].
    Let’s keep building smarter solutions together!  

  • Hi grazitti_sapna 

    The issue occurs because calculated columns are evaluated only during data load or refresh. They do not respond dynamically to slicer selections in the report view, which is why SELECTEDVALUE is not updating your column.

    To resolve this, you must use a Measure instead of a calculated column. Follow these steps:

    Delete the custom calculated column you created.

    Create a new Measure with the following DAX, replacing 'YourDataTable'[Date] with the actual date column used in your X-axis, and adjusting the hex color codes as needed:

    קטע קוד
    Bar Color Measure =
    VAR SelectedMonth = SELECTEDVALUE('Previous Meeting (Month)'[Previous Meeting (Month)])
    VAR SelectedDay = SELECTEDVALUE('Previous Meeting (Day)'[Previous Meeting (Day)])
    VAR MeetingDate = DATE(2026, SelectedMonth, SelectedDay)
    VAR CurrentBarDate = MAX('YourDataTable'[Date])
    RETURN
    IF(CurrentBarDate >= MeetingDate, "#0000FF", "#ADD8E6")
    Select your bar chart, go to the Format pane, and open the Columns (or Data colors) settings.

    Click the conditional formatting (fx) button next to the color.

    Set the Format style to Field value and select the [Bar Color Measure] you just created.

    The bar colors will now dynamically update whenever the parameter slicers are changed. For more organized and specific assistance, please share a sample file and an image of the expected result via a public cloud storage link.

    If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly

  • v-prasare's avatar
    v-prasare
    Icon for Community Support rankCommunity Support

    Hi 人才,

    We would like to confirm if our community members answer resolves your query or if you need further help. If you still have any questions or need more support, please feel free to let us know. We are happy to help you.


    Ritaf1983 & grazitti_sapna ,Thanks for your prompt response

     

     

    Thank you for your patience and look forward to hearing from you.
    Best Regards,
    Prashanth Are
    MS Fabric community support

  • v-prasare's avatar
    v-prasare
    Icon for Community Support rankCommunity Support

    Hi @人才,

    We would like to confirm if our community members answer resolves your query or if you need further help. If you still have any questions or need more support, please feel free to let us know. We are happy to help you.

     

     

    Thank you for your patience and look forward to hearing from you.
    Best Regards,
    Prashanth Are
    MS Fabric community support