Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
111 | |
100 | |
80 | |
64 | |
58 |
User | Count |
---|---|
146 | |
110 | |
93 | |
84 | |
67 |