Forum Discussion

Jousterama's avatar
Jousterama
New Member
2 years ago
Solved

How to update a Graph from Code

I added the code on lines 2, 3, and 4 in the attached image and selected the Check mark. But how does one update the actual Graphics to show the added lines when using PowerBI?

  • Hi, Jousterama 

     

    I've simply modelled some data to hopefully fit your situation.

    You can try the following methods. Add a new range table.

    Measure = CALCULATE(COUNT('Table'[Finish in]),FILTER(ALL('Table'),[Finish in]=SELECTEDVALUE(Range[Range])))+0

    Is this the result you expect? Please see the attached document.

     

    Best Regards,

    Community Support Team _Charlotte

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

3 Replies

  • The answer - The graphics are not going to show unless there is data in that range. 

    Second question - How does one show the graph as Zero when there is no data in that range?

    • Jousterama's avatar
      Jousterama
      New Member

      Using the option 'Show items with no data' did not provide an update to the graphic, per the attached. 

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

    Hi, Jousterama 

     

    I've simply modelled some data to hopefully fit your situation.

    You can try the following methods. Add a new range table.

    Measure = CALCULATE(COUNT('Table'[Finish in]),FILTER(ALL('Table'),[Finish in]=SELECTEDVALUE(Range[Range])))+0

    Is this the result you expect? Please see the attached document.

     

    Best Regards,

    Community Support Team _Charlotte

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