Forum Discussion

rob2's avatar
rob2
Frequent Visitor
6 years ago
Solved

Power BI Tooltip & Measure Calculation

I am having an issue with creating a measure that shows up accurately in the tooltip.

 

My measure "# of Scrapes Total" is showing 14 instead of 13.  It should only show 13 because I have a slicer to only show records for competitor with at least 3 competitor entries or more.

 

Could you please tell me what I'm doing wrong?  Thanks.

 

I included the PBIX file for your reference.  https://www.dropbox.com/s/tv8dvjjle37afor/Competitor%20Ex.pbix?dl=0

 

 

 

 

 

  • Hi Rob,

     

    The reason the total is showing up as 14 is because you're removing all the filter contexts except category, but including Competitor, in your measure.  Result is the slicer selection won't have any effect

     

    You could try something like this:

    # of Scrapes Total = CALCULATE([# of Scrapes],ALL(CompData[Competitor]),CompData[Number_Competitor_Entries]>=3)
     
    Obviously you end up with a hard coded threshold in this case.  Using a dynamic filter as described in this post would allow the report viewer to change the threshold.
     
    Cheers,
    Matt

2 Replies

  • mattneil's avatar
    mattneil
    Frequent Visitor

    Hi Rob,

     

    The reason the total is showing up as 14 is because you're removing all the filter contexts except category, but including Competitor, in your measure.  Result is the slicer selection won't have any effect

     

    You could try something like this:

    # of Scrapes Total = CALCULATE([# of Scrapes],ALL(CompData[Competitor]),CompData[Number_Competitor_Entries]>=3)
     
    Obviously you end up with a hard coded threshold in this case.  Using a dynamic filter as described in this post would allow the report viewer to change the threshold.
     
    Cheers,
    Matt