Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Hi,
I have the below 100% stacked column chart that has a yearly period as a small multiple, the constant line has added to each yearly period. However I just want the constant line on the last year 22/23, is that possible?
thank you for any help
Solved! Go to Solution.
In Power BI, if you want to add a constant line to a 100% stacked column chart but only have it appear in the last year (22/23 in your case), you can achieve this by using a combination of measures and conditional formatting. Here's how you can do it step by step:
Create a Measure for the Constant Line Value:
ConstantLineValue =
SWITCH(
MAX(YourYearColumn),
2022, 100, -- Change these values to match your year (e.g., 22/23)
2023, 100, -- Change these values to match your year (e.g., 22/23)
0 -- Default value for other years
)
Make sure to adjust the years and values to match your data.
Add the Constant Line to the 100% Stacked Column Chart:
Configure the Constant Line:
Conditional Formatting:
You can configure the color scale so that the constant line is only visible when the measure equals the value you specified for the last year (e.g., 100).
This way, the constant line will only appear in the last year (22/23) on your 100% stacked column chart. For other years, it will be hidden due to the conditional formatting. Adjust the measure and conditional formatting settings as needed to match your specific data and chart configuration.
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.
In case there is still a problem, please feel free and explain your issue in detail, It will be my pleasure to assist you in any way I can.
In Power BI, if you want to add a constant line to a 100% stacked column chart but only have it appear in the last year (22/23 in your case), you can achieve this by using a combination of measures and conditional formatting. Here's how you can do it step by step:
Create a Measure for the Constant Line Value:
ConstantLineValue =
SWITCH(
MAX(YourYearColumn),
2022, 100, -- Change these values to match your year (e.g., 22/23)
2023, 100, -- Change these values to match your year (e.g., 22/23)
0 -- Default value for other years
)
Make sure to adjust the years and values to match your data.
Add the Constant Line to the 100% Stacked Column Chart:
Configure the Constant Line:
Conditional Formatting:
You can configure the color scale so that the constant line is only visible when the measure equals the value you specified for the last year (e.g., 100).
This way, the constant line will only appear in the last year (22/23) on your 100% stacked column chart. For other years, it will be hidden due to the conditional formatting. Adjust the measure and conditional formatting settings as needed to match your specific data and chart configuration.
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.
In case there is still a problem, please feel free and explain your issue in detail, It will be my pleasure to assist you in any way I can.
User | Count |
---|---|
84 | |
80 | |
72 | |
71 | |
55 |
User | Count |
---|---|
108 | |
106 | |
93 | |
85 | |
67 |