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 all
I am trying to calculate the annual percentage change & need help here.
This is my data source.
How can I create the total sales for Product A from 2015-2018.
I have about 100+ products. Can anyone advice me?
Solved! Go to Solution.
Hi @Anonymous ,
You source data is little different with the one in previous post, I've made some transform to make sure the consistency. you can use the date column as slicer, filter the 2015-2018, the total will change accordingly.
Alternatively, you can use the measure by @AlB :
Pbix attached.
Hi @Anonymous
1. Place Table1[Product] in the rows of a table visual
2. Create this measure and place it in the visual
Measure = VAR YearsToShow_ = { 2015, 2016, 2017, 2018 } RETURN CALCULATE ( SUM ( Table1[Value] ), YEAR ( Table1[Date] ) IN YearsToShow_
)
You can also do this by just setting slicer on year and Product and filter what you need
Please always show your sample data in text-tabular format in addition to (or instead of) the screen captures. A screen cap doesn't allow people to readily copy the data and run a quick test and thus decreases the likelihood of your question being answered. Just use 'Copy table' in Power BI and paste it here. Or, ideally, share the pbix (beware of confidential data).
so if i have 100+ product, i would need to do it for every product?
would there be an easier way?
Sure. Like I said, you can use slicers on Product and Year. If you place Product on the rows of a matrix visual and the measure in the previous post you'll get the total 2015-2018 for each product, one per row.
I'm quite new to power bi and still lost.
would you mind elaborating more on the slicer?
Here the excel file.
Thank so much in advance
Hi @Anonymous ,
You source data is little different with the one in previous post, I've made some transform to make sure the consistency. you can use the date column as slicer, filter the 2015-2018, the total will change accordingly.
Alternatively, you can use the measure by @AlB :
Pbix attached.
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 | |
95 | |
77 | |
68 | |
54 |
User | Count |
---|---|
144 | |
105 | |
102 | |
89 | |
63 |