Forum Discussion

noliverte's avatar
noliverte
Helper III
6 years ago
Solved

graphic filtering : formula problem

Hello,

I have the following  reporting test

On the top left, I have a filter (with all my campaigns name)

When I select one campaign, I'd like to have "note_20" in the red field (as in the table), but I have a wrong result

 

For instance when I select campaign2, I have the following result

instead of 17,79...

 

My formula

- note_20 = DIVIDE(Feuil1[total_score]*20,[Maximum de score par campaign_name])

 

 

total_score = sum(Feuil1[score])

Maximum de score par campaign_name =
MAXX(ALLSELECTED(Feuil1[campaign_name]),[total_score])

Question : How can I display the right "note_20" value in the red field ?

 

A response would be appreciated.

 

Have a nice day

 

Noliverte

  • Your measure is always going to return 20, since you are basically multiplying 20 by 1 (when one campaign is selected).  Switch your ALLSELECTED to an ALL to get the correct result (in your existing measure or in a new measure just for that card).

     

    If this works for you, please mark it as the solution.  Kudos are appreciated too.  Please let me know if not.

    Regards,

    Pat

5 Replies

  • mahoneypat's avatar
    mahoneypat
    Microsoft Employee

    Your measure is always going to return 20, since you are basically multiplying 20 by 1 (when one campaign is selected).  Switch your ALLSELECTED to an ALL to get the correct result (in your existing measure or in a new measure just for that card).

     

    If this works for you, please mark it as the solution.  Kudos are appreciated too.  Please let me know if not.

    Regards,

    Pat

    • noliverte's avatar
      noliverte
      Helper III

      Hello mahoneypat,

      Thank you for your response.

      My slicer is filtering just "note_20" (in red). It's what I want, but the result is always 20,00 (if I select a campaign0 or campaign1 or campaing2) and 55,75 if I have no selection in my slicer selection...

      It's certainly a formula error ???