Forum Discussion
Trouble with Line Chart Y-Axis Constant Line
I have a measure that works great for the "Line y-axis" on a "Line and clustered column chart". The returned value even adds itself into the legend which is awesome.
Safety Stock =
VAR CurrentItem = SELECTEDVALUE(Historical_Inventory_Trends[ITEM])
RETURN
CALCULATE(
MAX(Item_Master[Safety Stock]),
FILTER(
Item_Master,
Item_Master[ITEM] = CurrentItem
)
)
When I try convert this to a "line chart" this measure will not work in the "Y-Axis Constant Line". It is simply returning zeros for all my small multiples. Any pointers as to what am I doing wrong?
| Histoical_Inventory_Trends | ||
| yyyy-MM-dd | ITEM | QTY ON HAND |
| 2024-01-01 | 1234 | 50 |
| 2024-01-02 | 1234 | 42 |
| 2024-01-03 | 1234 | 38 |
| 2024-01-04 | 1234 | 75 |
| 2024-01-05 | 1234 | 62 |
| Item_Master | |
| ITEM | Safety Stock |
| 1234 | 45 |
7 Replies
- AnonymousNot applicable
Hi OKgo ,
Can you provide a screenshot of the visual object you are currently having problems with?
Also may I ask what you need to use the Y-Axis Constant Line for? Because specifically the Y-Axis Constant Line is not the same as the Line y-axis in the Line and clustered column chart, which corresponds to the Line Chart's Secondary y-axis.
Best Regards,
Dino Tao - OKgoHelper IV
Thank you for taking the time.
The purpose of the line is to observe stock levels over time / weeks / months and display the current safety stock along side those visuals.
With the Line & Clustered column chart, I have no problem adding the blue line (safety stock).
In the line diagram - I was hoping the measure in the original post could replicate that blue line. But everytime I load the measure it just displays as zero.
Thanks again
- Ashish_MathurSuper User
Hi,
Share the download link of the PBI file.
- OKgoHelper IV
Hi Ashish
Thank you so much. In putting it in this format I realized that status is a factor I was not considering in my orignal post.https://1drv.ms/u/c/27d202cd90a61387/EdSBS_6BSXVOiFjS78nFoasBcUBI8ZeEVqe8pmTc8V5tQg?e=a2Uc7F
Many thanks again
C