Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi All,
I have to create a line visual which shows target range and line trend as mentioned below.
1.X-axis: display only latest 6 months data which should pop up automatically every time without manual changes
2.Y- axis: Blue line indicates percentage value of Resolved Bugs out of Total Bugs. Condition applied is generic for easy understanding and to build own user data to represent on the report.
3.Y-axis: Target line indicates fixed values which are decided at the beginning of the report formation and for current report-
Consider : Oct – Dec : 50 % & Jan – Mar : 60 %
i came across median, mean lines but those lines will be applied throughout the visual which does not fits to my case. any help is apreciated.
Thanks
Santosh
Solved! Go to Solution.
Hi, @SantoshKumar
According to your description and expected output, I think you can just use the line chart in Power BI to achieve this, you can try just place the columns within the sample data and set it like this:
Or you can try this measure to perform as the target line of the chart:
Target =
SWITCH(
TRUE(),
MONTH(MAX([Date]))>=10&&MONTH(MAX([Date]))<=12,0.5,
MONTH(MAX([Date]))>=1&&MONTH(MAX([Date]))<=3,0.6,
BLANK())
And you can get what you want.
We can not use the constant line of the chart to achieve this because the line runs through the entire picture and does not segment.
Analytics with Power BI Desktop Using Constant Lines
You can download my test pbix file below
Thank you very much!
Best Regards,
Community Support Team _Robert Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @SantoshKumar
According to your description and expected output, I think you can just use the line chart in Power BI to achieve this, you can try just place the columns within the sample data and set it like this:
Or you can try this measure to perform as the target line of the chart:
Target =
SWITCH(
TRUE(),
MONTH(MAX([Date]))>=10&&MONTH(MAX([Date]))<=12,0.5,
MONTH(MAX([Date]))>=1&&MONTH(MAX([Date]))<=3,0.6,
BLANK())
And you can get what you want.
We can not use the constant line of the chart to achieve this because the line runs through the entire picture and does not segment.
Analytics with Power BI Desktop Using Constant Lines
You can download my test pbix file below
Thank you very much!
Best Regards,
Community Support Team _Robert Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@SantoshKumar Seems like you could just create one or two additional measures for the constant lines. You could build the date logic into the measure to display BLANK if out of desired date range and the constant otherwise.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
72 | |
70 | |
55 | |
37 | |
31 |
User | Count |
---|---|
83 | |
64 | |
63 | |
49 | |
45 |