Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.
Hi,
I need help because I have a chart which displays YTD and PY YTD measure. My first issue is it won't display the data if YTD sales is null so I tried adding +0 in the formula which resulted to displaying the data. But it resulted to another problem which is PY YTD showing null but should have values on it.
First screenshot below is correct if using Year as column but I need YOY% so I need to display the format on the 2nd screenshot
with problem (I need to use this format with YTD and PY):
Can someone help me on my problems?
Here is my pbix
Solved! Go to Solution.
Your first issue can be solved with a new explicit measure
SumSales = 0+sum(data[Sales ])
The second can be resolved similarly
Prior Year Sales = 0+CALCULATE([SumSales],SAMEPERIODLASTYEAR(CalendarDate[Date]))
Make sure your calendar table has a 1:M relationship.
The YoY% measure can then be written as:
YoY%= divide([SumSales]-[Prior Year Sales],abs([Prior Year Sales]),0)
See attached.
Your first issue can be solved with a new explicit measure
SumSales = 0+sum(data[Sales ])
The second can be resolved similarly
Prior Year Sales = 0+CALCULATE([SumSales],SAMEPERIODLASTYEAR(CalendarDate[Date]))
Make sure your calendar table has a 1:M relationship.
The YoY% measure can then be written as:
YoY%= divide([SumSales]-[Prior Year Sales],abs([Prior Year Sales]),0)
See attached.
Have you looked at my attached pbix? There it shows correctly.