monthlyaverage
4 TopicsHow to calculate average profit ONLY when the product has been bought and sold in selected time.
Hello. I need to calculate the average profit of per product and in general in the selected time period. It is for a scrap business that buys scrap and then sells it forward. However, I only want to calculate profits for a product that has been bought AND sold in the selected period, because otherwise it will calculate a loss if a product has been recently bought in the selected time period but not sold. Now I have created a DAX formula that can calculate this on single products. Formula looks like this: Kate keskimäärin = IF( NOT(ISBLANK([Ostot keskimäärin €/T])) && NOT(ISBLANK([Myynti keskimäärin €/T])), [Myynti keskimäärin €/T] - Ostot[Ostot keskimäärin €/T], BLANK() ) Where "Ostot keskimäärin €/T" is average buying price and "Myynti keskimäärin €/T" is average sales price. It works and calculates this on single products but when it comes to the overall average on all the products it calculates also the ones that how been bought but not sold and vice versa. As you can see in this table the total is calculated falsley since it includes everything. Does anybody know how I can get the average profit in total? It doesnt necessarily have to be visible in the table but I need the calculation to show the average profit All help will be appriciated.Solved856Views0likes2CommentsHow to compare all-time monthly values and output percentage changes ?
Hello Community, I am experiencing difficulty creating a DAX Command that compares my monthly averages and percentage changes. I need to see all-time average rather than the average for the month. I will include the information below. I need to display the % change in a table with the following columns: Product Identification, (All time - 2022-9), (All time - 2022-10), and % change. I do not own the live dataset. Any help would be greatly appreciated. I will provide images below. Thank you! Best,598Views0likes2CommentsGet even total average across months
Hi there, I need help with getting an even average across the calendar months counting from the start date adding to 12 months. I have a date table connected to my data table through the "start_date". I just need the average from the total evenly spread across the months starting from the start date for instance, please see result below. Thank you in advance for your help. Data: product total_amt start_date end_date Months a 100 4/1/2020 3/31/2021 12 b 200 1/1/2020 12/31/2020 12 c 300 2/1/2020 1/31/2021 12 Expected Result: product total_amt start_date end_date Months Jan-2020 feb-2020 march-2020 April-2020 May-2020 jun-2020 Jul-2020 Aug-2020 Sept-2020 Oct-2020 Nov-2020 Dec-2020 jan-2021 feb-2021 March-2021 a 100 4/1/2020 3/31/2021 12 8.3 8.3 8.3 8.3 8.3 8.3 8.3 8.3 8.3 8.3 8.3 8.3 b 200 1/1/2020 12/31/2020 12 16.7 16.7 16.7 16.7 16.7 16.7 16.7 16.7 16.7 16.7 16.7 16.7 c 300 2/1/2020 1/31/2021 12 25 25 25 25 25 25 25 25 25 25 25 25Solved777Views0likes2CommentsMonthly Average of a column (Exchange Rate)
Hi, I have an exchange rate master in my model, with following columns: Conversion Date Currency From Currency To Conversion Rate I want to create a calculated column using Dax that gives Monthly Average Conversion Rate (aggregated on Currency From and Currency To). Also please note that Conversion rates might not be available for every date in a month, hence average needs to be calculated accordingly i.e. based on available rates only. Please help! Thanks in advance, ShaileeSolved2.4KViews0likes3Comments