12 month
2 TopicsLast 12 month sold for working days only
Hi, I want to calculate the sales/square meter for the past 12 months. But i need to edit two measures that talk each other. I wrote this function to calculate the sales for the last 12 months, and it works: Last 12 month= CALCULATE ( [Sold], TREATAS ( CALENDAR ( EDATE ( TODAY (), -12 ), TODAY () - 1 ), Time[Date] ) ) I have a Sold/Square meter measure, which is written like this and takes into account ONLY the days worked out of 365 Sold/MQ 365 = CALCULATE( [Sold] / 365*365/[Sold Area], FILTER( VALUES( ANCLI[Sales Point ID] ), [Sales Area] > 0&&[Sold]<>BLANK())) But writing [Sold]/365, it's wrong because i want ONLY the days on which a store has sold But how do I modify this last one so that it takes into account ONLY the days on which a store has sold? Basically i want this replicate this formula ((sold/n° working days)*365)/Sold Area into measure. How i do that? After edited last formula, now i should write Last 12 Month = CALCULATE ( Sold/MQ 365, TREATAS ( CALENDAR ( EDATE ( TODAY (), -12 ), TODAY () - 1 ), Time[Date] ) ) Thank you for your helpSolved684Views0likes3Comments12 month moving ttl or avg for Direct Query, PBI Report Server
Hello, My practice before posting a help request is to research post, hack at the internet, and hack at the DAX functional language first. I need help. I am using Power BI Report Server. I am using Direct Query. I've learned that the above does not have the full range of functions as 'regular' Power BI. DATESBETWEEN is not available. With direct query, I can not create a separate date table. I am using the date column in my queried table. Need I would like to create a 12 month moving total. I've looked at Dax Patterns but I can't find a solution. I've looked at old DAX articles (hopeing to find something before DATESBETWEEN was introduced). I've looked here but the articles are for Desktop and all refer to DATESBETWEEN. Thank you in advance for your help. DAXRichArd657Views0likes0Comments