Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi team,
We have a requirement where we have to display difference between PY and CY bars as data label in a bar chart. We are stuck at this point. If anyone have any points please let me know.
I have created below chart, unable to proceed further.
Thanks in advance.
Solved! Go to Solution.
Hi @Optimusprime_25 ,
I have created a simple sample, please refer to my pbix file to see if it helps you.
Create a measure to calculate the difference.
Measure = VAR _1=SUMX(FILTER(ALL('Table'),'Table'[subject]="CY"&&'Table'[date]=SELECTEDVALUE('Table'[date])),'Table'[VALUE])
VAR _PY=SUMX(FILTER(ALL('Table'),'Table'[subject]="PY"&&'Table'[date]=SELECTEDVALUE('Table'[date])),'Table'[VALUE])
RETURN
_PY-_1
Then choose the Line and clustered column chart.
Put the measure to the Line y-axis.
Next select Format your visual>>Data label>>Series.
Finally adjust the stroke width to 0 px.
How to Get Your Question Answered Quickly
If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .
Best Regards
Community Support Team _ Polly
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Optimusprime_25 ,
I have created a simple sample, please refer to my pbix file to see if it helps you.
Create a measure to calculate the difference.
Measure = VAR _1=SUMX(FILTER(ALL('Table'),'Table'[subject]="CY"&&'Table'[date]=SELECTEDVALUE('Table'[date])),'Table'[VALUE])
VAR _PY=SUMX(FILTER(ALL('Table'),'Table'[subject]="PY"&&'Table'[date]=SELECTEDVALUE('Table'[date])),'Table'[VALUE])
RETURN
_PY-_1
Then choose the Line and clustered column chart.
Put the measure to the Line y-axis.
Next select Format your visual>>Data label>>Series.
Finally adjust the stroke width to 0 px.
How to Get Your Question Answered Quickly
If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .
Best Regards
Community Support Team _ Polly
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks @Anonymous for your prompt response.
It has worked, we have done few modifications from our end.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!