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.
Hello everybody,
I have a slight problem for my Year-to-Year formula. I want to calculate the evolution of sales from 2020 to 2021.
It goes as follows:
- Conso Net Sales = SUM('DATA (2)'[CONSO NET SALES1])
So everything works. The only problem is that for some of my clients, I don't have data for 2020 and therefore, it does not want to show up in my Waterfall graph.
I know also the solution: I just have to indicate PowerBI that if there is no Data for 2020 (Previous Year), it just has to substract the data of 2021 with 0.
But I don't know how to add that in YOY formula...
Can you please help me?
Thank you very much
Solved! Go to Solution.
@Anonymous , based on what I got
ConsoNetSales YOY (Year-to-Year) =
VAR ValueCurrentPeriod = [Conso Net Sales]
VAR ValuePreviousPeriod = [ConsoNetSales PY]+0
VAR Result =
ValueCurrentPeriod - ValuePreviousPeriod
RETURN
Result
@Anonymous , based on what I got
ConsoNetSales YOY (Year-to-Year) =
VAR ValueCurrentPeriod = [Conso Net Sales]
VAR ValuePreviousPeriod = [ConsoNetSales PY]+0
VAR Result =
ValueCurrentPeriod - ValuePreviousPeriod
RETURN
Result
Easy but efficient solution! Thank you very much
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 |
---|---|
42 | |
21 | |
21 | |
14 | |
13 |
User | Count |
---|---|
43 | |
39 | |
33 | |
18 | |
17 |