Forum Discussion
Weighted measure (Calc. Col., DAX Measure or anything else could do the trick)
hi, euthor
You may try to use SAMEPERIODLASTYEAR Function and TOTALYTD Function to add two measure as below:
last year = CALCULATE(SUM(Table3[sales]),SAMEPERIODLASTYEAR(Table3[Date]))
this year = TOTALYTD(SUM(Table3[sales]),Table3[Date])
Result:
If it is not your case, please share sample pbix file or some data sample and expected output . You can upload it to OneDrive or Dropbox and post the link here. Do mask sensitive data before uploading.
Best Regards,
Lin
Hi all,
here's the raw file format for the data (Excel):
| Time Period | Brand | License | Sales |
| Jan 01 2018 - Jan 07 2018 | Galaxy wireless Mouse (Contoso) | Galaxy Wires | 150,00 € |
| Jan 01 2018 - Jan 07 2018 | Contoso USB mouse | Not Specified | 43,00 € |
| Jan 01 2017 - Jan 07 2017 | Galaxy wireless Mouse (Contoso) | Galaxy Wires | 150,00 € |
| Jan 01 2017 - Jan 07 2017 | Contoso USB mouse | Not Specified | 43,00 € |
| Sep 29 2018 - Sep 04 2018 | Galaxy wireless Mouse (Contoso) | Galaxy Wires | 170,00 € |
| Sep 29 2018 - Sep 04 2018 | Contoso USB mouse | Not Specified | 45,00 € |
| Sep 29 2017- Sep 04 2017 | Galaxy wireless Mouse (Contoso) | Galaxy Wires | 170,00 € |
| Sep 29 2017- Sep 04 2017 | Contoso USB mouse | Not Specified | 45,00 € |
Please note that:
- the section with date is in text format (for PBIX file), and it cannot be converted it to data format as weel - already tried, PBIX cannot perform the operation;
- both brand and license data are reported as text, while the only number format is for Sales data.
- I remind you that I cannot modify the format in any case.
The desired result is to display a pie chart which shows how much the 'Not Specified' total sales for weight (in terms of percentage) compared to the total amount of the ficitional Licensed goods for 2018 --> in other terms, I have to display graphically the market share of both Licensed and non-licensed goods.
Hope this would help you to figure out your solutions to my problem!
Thank you.
- Ashish_Mathur8 years ago
Super User