Forum Discussion
Lowest Value
Hi,
I am trying to create a line on my bar visual like below;
But I would like to add a line that displays the lowest value for the past 7 days even say when the date range is anything else?
Any help would be great
thanks
Hi MrGriff ,
Try the following measure, and then add it to value. Add it in the min line, refer to the following:
Last_7 = CALCULATE ( MIN ( 'Table'[Value] ), DATESINPERIOD ( 'Table'[Date], TODAY (), -7, DAY ) )
If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.Best Regards,
HenryIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Below is the sample pbix file.
5 Replies
- Jihwan_KimSuper User
Hi, MrGriff
Please try something like the below measure, and add it as a line values.
Min value during latest 7 days =
VAR lastdatetoday =
TODAY ()
RETURN
MINX ( DATESINPERIOD ( Dates[Date], lastdatetoday, -7, DAY ), [Qty total] )Hi, My name is Jihwan Kim.
If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.
Linkedin: linkedin.com/in/jihwankim1975/
Twitter: twitter.com/Jihwan_JHKIM
- MrGriffFrequent Visitor
Jihwan_Kim
That works for the DAX measure perfectly, but when I add it to the visual it goes a little wrong as you can see?any ideas?
- Jihwan_KimSuper User
Hi, MrGriff
Thank you for your feedback.
If it is OK with you, please share your sample pbix file's link here, then I can try to come up with a more accurate measure.
I assume you only want to see the line within the selected date period, right?
- v-henryk-mstfCommunity Support
Hi MrGriff ,
Try the following measure, and then add it to value. Add it in the min line, refer to the following:
Last_7 = CALCULATE ( MIN ( 'Table'[Value] ), DATESINPERIOD ( 'Table'[Date], TODAY (), -7, DAY ) )
If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.Best Regards,
HenryIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Below is the sample pbix file.