Forum Discussion

Abrar786's avatar
Abrar786
Icon for Helper I rankHelper I
3 years ago

YTD Sales Measure

Hello,

 

I am using category segmentation here. When I apply the measure at the category level, the YTD CY Sale measure is working fine. However, when I apply the same measure at the customer level, it shows the same total for all customers. Can you please help me fix this?

 

 

Following is my measure: 

 

YTD Sales = TOTALYTD([Total Sale],'Calendar'[Date])
 
YTD CY Sale =
 
CALCULATE (
    [YTD Sales],    
    FILTER (
        ALL ( invoices_details[customer_no] ),
        COUNTROWS (
            FILTER (
                'category',
                [YTD Sales] >= 'category'[category min value]
                    && [YTD Sales] < 'category'[category max value]
            )
        ) > 0        
    )
)

 

Thank you.

7 Replies