Forum Replies Created

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • in reply to: Value Change Between Last Two Dates #5340

    Fahad
    Participant
    • Started: 0
    • Replies: 6
    • Total: 6

    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.

     

     

    in reply to: Value Change Between Last Two Dates #5331

    Fahad
    Participant
    • Started: 0
    • Replies: 6
    • Total: 6

    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.
    in reply to: Value Change Between Last Two Dates #5327

    Fahad
    Participant
    • Started: 0
    • Replies: 6
    • Total: 6

    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

     

     

     

    in reply to: Average by Month – only the months have sales #3777

    Fahad
    Participant
    • Started: 0
    • Replies: 6
    • Total: 6

    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

     

    in reply to: #1387

    Fahad
    Participant
    • Started: 0
    • Replies: 6
    • Total: 6

    Did you try the second measure and still your third measure is not clear for me. can you clarify in excel file.

    Thank you

    in reply to: #1364

    Fahad
    Participant
    • Started: 0
    • Replies: 6
    • Total: 6

    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

Viewing 6 posts - 1 through 6 (of 6 total)