The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Is there a way to only shade between 2 dates (constant lines)?
The shading options are only before/after, so I get this overlap, but I don't want the whole graph to be shaded - only between the dotted lines.
Here is my workaround:
Not bad, but I'd prefer the shaded area to be between the target dates.
Thank you!
Hi @Anonymous ,
In Power BI, shading between two constant lines (dates) is not directly supported in the built-in visuals. However, you can achieve a similar effect using custom visuals or by creatively using the available features.
One approach is to use the Power KPI Custom Visual. You can use the top and bottom lines as Area and turn Area Opacity to 100. For the minimum line, choose white (or whatever your background color is) and for the maximum line, choose whatever you want your area color to be.
Another approach is to create a measure that returns values only between your two dates and then plot this measure on your chart. This will effectively create a “shaded” area between the two dates.
Solved: Shading area between two lines - Microsoft Fabric Community
Please note that these are workarounds and might not work perfectly for all scenarios or data sets. If this is a critical feature for your reports, you might want to consider using a more advanced data visualization tool that supports this feature natively.
Best Regards