Forum Discussion

Boycie92's avatar
Boycie92
Icon for Resolver I rankResolver I
8 years ago
Solved

DAX help - when filtering reports

Hi, I’m wondering if someone can help.   I have the following Measures:   No of Sales = CALCULATE(COUNTROWS(Sales),Sales[Time Period] = "<= 28 days")   No of Records = COUNTROWS(Sales)   % ...
  • MFelix's avatar
    8 years ago

    Hi Boycie92,

     

    When you are calculating the overall percentage you have overlaping the filters in the context and choosing all of the data, that is why your overall calculations are differente because you are calculating the month values over all sales you need to use ALLSELECTED.

     

    % = DIVIDE([No of Sales],CALCULATE([No of Records],ALLSELECTED(Sales)),0)

    Regards,

    MFelix