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 have a dataset where I dont have date column but have data year by year. I know to caclculate YOY with date column, but with out date column how can we calculate YOY is something I am not sure. I tried to create a date table but that did not work.
DateSet I have is
Company | Year | Sales |
Company ABC | 2017 | 1000 |
Company ABC | 2018 | 750 |
Comapny ABC | 2018 | 750 |
Company XYZ | 2017 | 2000 |
Company XYZ | 2018 | 1000 |
GEFF | 2017 | 3000 |
GEF | 2018 | 100 |
GEFF | 2018 | 100 |
I want to show in Matrix visualizations. Below is the sample output
Year Company | 2017 Sales Amount | 2017 Sales Variance | 2018 Sales Amount | 2018 Sales Variance |
Comapny ABC | 1000 | 0 | 1500 | 500 |
Company XYZ | 2000 | 0 | 1000 | -1000 |
GEFF | 3000 | 0 | 200 | -2800 |
Solved! Go to Solution.
was able to get using the way explained in below link
was able to get using the way explained in below link
Try this
First you need to have a date table
In your date_dim add these two columns
This did not work. For some reason "Last year sale" is blank and YOY is resulting same as this year. Below are the formulas I used. I had to tweak YOY formula little bit as currently I am just interested in difference. I imported dates with Start of the year and Year Rank colum
Have you created a date table?
Lastyearsale = Calculate(sum('table'[sales]),filter(all(datetable),'dateswithrank'[Year Rank] = MAX('dateswithrank'[Year Rank])-1))
You need to call your date table in all
'dateswithrank' is the datetable for me. Not sure if I missing something when you refer 'datatable'. In my 'dateswithrank' table I have all dates, years, and rank columns.
I dont want to hardcode Years, as I will not be aware of what years and for how many years of data I will get.
Sale_2017 = CALCULATE(SUM('Table'[sale]),'Table'[year]=2017)
Sale_2018 = CALCULATE(SUM('Table'[sale]),'Table'[year]=2018)
YoY = ([Sale_2018] / [Sale_2017])-1
You need these three Measures
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 | |
36 | |
33 | |
18 | |
18 |