Forum Discussion

Srinivas3350's avatar
Srinivas3350
Icon for Helper II rankHelper II
3 years ago

Help in calcuation

Hi Can anyone help me in this DAX i tried something but it is not working properly

calculate the percentage value of deliveries due month to date which have been invoiced. Please can you show this as a percentage figure, and also include a graphic such as a barometer? 

 

InvoicePercentageMTD =
DIVIDE(
    CALCULATE(
        COUNTROWS('Table'),
        'Table'[DATE_DELIVERY_DUE] <= TODAY(),
        MONTH('Table'[DATE_DELIVERY_DUE]) = MONTH(TODAY()),
        NOT(ISBLANK('Table'[DATE_INVOICED]))
    ),
    CALCULATE(
        COUNTROWS('Table'),
        'Table'[DATE_DELIVERY_DUE] <= TODAY(),
        MONTH('Table'[DATE_DELIVERY_DUE]) = MONTH(TODAY())
    )
)

 

The text above in bold is the rquirement i tried this dax but i am not getting value let me explain in detail
if we select a Month it should have to show from starting to current before day. Lets say today is 14th july the percentage should show from 1st 13th if i go for 15th jly it should show 1st to 14th and can any one suggest me to show this visual in a good way 
 
Thanks in advance
srinivas

5 Replies

  • Hi 

     

    Delivery_Due_dateInvoiced_date
    02/07/2331/05/23
    03/07/2301/07/23

    the above dates are in table and we are having date table the relation detween these table invoiced date to date and now the requirement I got is This figure needs to calculate the percentage value of deliveries due month to date which have been invoiced, so that the Shipping team can see how we are performing against the orders that should have already been shipped so far this month (based on due dates).

     and they asked to show this in a percentage figure, and also include a graphic such as a barometer?

    If you have any suggestions to visualize in a good way let know

    yearMonthdate
    2023july

    01/07/23

  • hello let me give you the formula 
    invoiced GBP (delivery due date upto 1st july to current date/orders GBP(delivery due date upto 1st july to current date

    • lbendlin's avatar
      lbendlin
      Icon for Super User rankSuper User

      Unfortunately none of this helps.  Please provide sample data that fully covers your issue.
      Please show the expected outcome based on the sample data you provided.