Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
rob2
Frequent Visitor

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

 

 

 

Comp Pic.png

 

 

1 ACCEPTED SOLUTION
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

View solution in original post

2 REPLIES 2
Icey
Community Support
Community Support

Hi @rob2 ,

For your measure ‘# of Scrapes Total’, ‘ALLEXCEPT(CompData,CompData[Category])’ removes all context filters in the table except the filter that has been applied to column ‘Category....

So, the value of ‘# of Scrapes Total’ won’t change except filtering category.

Power BI Tooltip & Measure Calculation 4.PNGPower BI Tooltip & Measure Calculation 4-1.PNG

 

Best Regards,

Icey

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.