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
ThomasDay
Impactful Individual
Impactful Individual

A single value in column [CMI] in file....cannot be determined...

Hello all--yes, this is a very common error.  Part of the DAX learning experience I guess.  There are many variations it seems.

 

 The measures (derived from measures) I'm looking to create are of the form like this: ALOS_CMI Adj = DIVIDE( [ALOS], AdjustmentFactors[CMI])

  • The AdjustmentFactors table is related 1-many to the table [ALOS] is created in/from.  
  • For any single Provider's measure, there is ONE AdjustmentFactor[CMI].
  • I'd sure like totals to total up the resulting calc, not the total [ALOS] divided by total [CMI]

If I use DIVIDE ( [ALOS], Min(AdjustmentFactors[CMI])) that makes it a scalar...and the individual results are good.  Doesn't that make every average wrong? (though I don't plan to compute averages for a group)

 

So what are the options? Do I really have to store the resulting calc somehow?

Thanks,

Tom

 

 

1 ACCEPTED SOLUTION
Greg_Deckler
Super User
Super User

Try using a VAR, see the blog article here:

http://community.powerbi.com/t5/Community-Blog/DAX-as-a-Language/ba-p/22120

 


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

3 REPLIES 3
Greg_Deckler
Super User
Super User

Try using a VAR, see the blog article here:

http://community.powerbi.com/t5/Community-Blog/DAX-as-a-Language/ba-p/22120

 


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Thanks very much.  I'll try it tomorrow!  Tom

ThomasDay
Impactful Individual
Impactful Individual

@Greg_Deckler That worked great.  Here's the pattern I ended up using.

 

XXX Adj =
// Each facility is a single scalar, but the totals are an average of the CMI's--and not adjusted
// for the case counts in each facility
VAR CMIVAL = DIVIDE(SUMX(FR2015_standardizing_file, [CMI]),COUNTX(FR2015_standardizing_file,[CMI]))
RETURN
(DIVIDE([XXX],CMIVAL))

 

Thanks,

Tom

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.