Forum Discussion

philjohn's avatar
philjohn
Frequent Visitor
2 years ago
Solved

Proportional Calculation Ignoring Filters

Help, what I'm trying to achieve

 

I have a series of Topics collected from documents, mentioned across time via date

On some dates we collected more documents, therefore it looks like topics are "more spoken of" at certain times when using a straight count but its actually skewed data


So what I need is a count that takes the amount of a certain topic mention (determined by a filter), divided by number of topics in total on the date (without a filter) - to give me proportional %

 

and the DAX is just refusing to play nicely

 

This is what ive wrote

 

Proportional = DIVIDE(
    COUNT('doc_classification'[classification]),
    COUNT(ALL('doc_classification'[classification]),
     0
     )
 
and I get this back: Too many arguments were passed to the COUNT function. The maximum argument count for the function is 1.
 
This felt easy, it must be... I am just barking up the wrong tree right, please help
  • philjohn , Try like

    Proportional = DIVIDE(
    COUNT('doc_classification'[classification]),
    calculate(COUNT('doc_classification'[classification]), all('doc_classification'[classification])) ,
    0
    )

2 Replies

  • philjohn , Try like

    Proportional = DIVIDE(
    COUNT('doc_classification'[classification]),
    calculate(COUNT('doc_classification'[classification]), all('doc_classification'[classification])) ,
    0
    )

    • philjohn's avatar
      philjohn
      Frequent Visitor

      Wrap it in a calculate! So close, yet so far - thank you so much