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
hoffsquig
Regular Visitor

table value doesn't match card value for simple measure

Hey all.  this "issue" is driving me crazy.   I have a measure that contains an IF statement.  It is set to 0 or 1 depending if the measure meets a goal.  These rates are calculated by month with a relationship to an associated Date table based on a YearMonth column.  

 

AttritionGood = if('Devs'[AttritionRate] <= 'Devs'[AttritionGoal], 1, 0)

hoffsquig_5-1682594296625.png

 

The AttritionRate is 22.6% and the AttritionGoal is 20%, so the measure correctly displays 0 in the card visual.  It calculates correctly as I use my slicer to select the other months.

 

HOWEVER, when I reference this measure in a table I created, in the "ATTGOOD" column, every row (month) shows 1, and doesn't match the card for the months where it's 0.  The weird part is, I've done the same measure for other metrics, and they calculate correctly in the table showing a 0 or 1 for the respective month (MCGood, TNMCMGood), while the Attrition measure, which as far as I can tell is exactly the same....always shows a 1 and doesnt match the card visual.  The only difference between the ones that are working, and this broken Attrition measure is different source tables.  But I double checked that the model relationships are the same to the date table as well.  Why doesn't it match the card?!  I've clearly missed something.  Any ideas?

hoffsquig_4-1682593898413.png

 

 

3 REPLIES 3
HotChilli
Super User
Super User

It will be a context issue.  Measures are evaluated according to context.  I can't tell from the provided information how these measures are being used but this "HOWEVER, when I reference this measure in a table I created, in the "ATTGOOD" column" sounds like a measure is being used in a calculated table. This is not good.

So you will have to look at this a different way. 

-

Also, by convention, we refer to measures without the base table.

And please don't use measures in calculated columns, use them in visuals.

So, I guess I dont know how to accomplish this.  The real issue is that my time series line chart doesn't match the Gauge.  The gauge is based on a measure

FleetHealthRating = (MCGood + AttritionGood + TNMCMGood) / 3.

I place the same FleetHealthRating measure in a line chart, and the monthly values (context?) dont match.  I dont understand context all too well, but it feels like the two should at least match, even if they're wrong overall.

I thought the table in the question would above help me work around it, but I'll abandon that idea.   See below.

 

hoffsquig_0-1682596827401.png

 

it's clearly all context issues on some of my measures.  I'll double check them all.  I probably didn't use the calculate function correctly

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.