Forum Discussion

Justas4478's avatar
Justas4478
Post Prodigy
1 year ago
Solved

Measure returns wrong totals

Hi, I have this measure: CALCULATE(     DISTINCTCOUNT('Outbound Delivery Document'[DocumentNumber]),     REMOVEFILTERS('Date'[Date]),     TREATAS(VALUES('Outbound Delivery'[OutboundDeliveryDocum...
  • Justas4478's avatar
    Justas4478
    1 year ago

    DataNinja777 I think I manage to find solution that solved my problem.
    I am just unsure how does it work.
    I know one thing that it looks like customer sum was a problem and not floors.
    But I still dont understand why I had to change

    DISTINCTCOUNT('Outbound Delivery Document'[DocumentNumber])

    to 

    DISTINCTCOUNT('Outbound Delivery'[OutboundDeliveryDocumentKey])
    and 
    VALUES('Outbound Delivery'[OutboundDeliveryDocumentKey]),
                'Outbound Delivery Document'[OutboundDeliveryDocumentKey]

    to 

    TREATAS(
                VALUES('Outbound Delivery Document'[OutboundDeliveryDocumentKey]),
                'Outbound Delivery'[OutboundDeliveryDocumentKey])

     

    And how those changes solved the problem.