Forum Replies Created
-
AuthorPosts
-
Sorry thought you wanted the difference between totals, any way here is what you need
Sales Revenue:=CALCULATE(SUM(Sales[Sales]),LASTDATE(Sales[Date]))
sales minus 1 day:=CALCULATE(SUM(Sales[Sales]),LASTDATE(DATEADD(Sales[Date],-1,DAY)))
difference:=[Sales Revenue]-[sales minus 1 day]
The result is -347
attached is the workbook.
No worries , I think the logic still holds , I have deleted one day from the last date , so you will have one day apart between 19/07/2016 and 17/07/2016.
when you drag the measure difference you will get the difference between the last two dates. I have attached is the workbook.
Hope this helps.
Thank you
Attachments:
You must be logged in to view attached files.Hi Porter,
you can create two measures:
First is to calculate the total sales and you already did this in your workbook Sales Revenue:=SUM(Sales[Sales]).
Second is to calculate the total sales minus one interval which is days at your case Sales Revenue minus one day:=CALCULATE(SUM(Sales[Sales]),DATEADD(Sales[Date],-1,DAY))
your requested measure is only calculating the difference
sales difference := Sales Revenue – Sales Revenue minus one day
hope this helps.
Thank you
Hi Rogerio,
How is the data structured , can add the file so we can try to help you.
However, if you want to create a measure that calculate the average for products if they have sales more than 0 then you can use this formula:
measure:=CALCULATE(AVERAGE(Table[product]),Table[product]>0)
Thanks
Did you try the second measure and still your third measure is not clear for me. can you clarify in excel file.
Thank you
Hi Kirvis,
for your second measure (2.Average order value for orders that contain a product from the selected category) you can use this simple dax:
average:=CALCULATE(AVERAGE(Table1[sales]))for your third measure sorry I didn’t get what you want please explain more.
Thank you
-
AuthorPosts