cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Converting Calculated Column to Measure

Hi Experts,

 

Below is the DAX for Calculated Column, I would like to convert the same as DAX Measure. Can anyone Help me Please!!!


Calculated Column to Measure.PNG

 

Thank you

1 ACCEPTED SOLUTION

I'd probably rewrite it something like this:

 

AUMBAND =
VAR CurrentPortfolio =
    VALUES ( 'Financial Overview'[Portfolio] )
VAR CurrentFinPort =
    FILTER (
        'Financial Overview',
        'Financial Overview'[Portfolio] IN CurrentPortfolio
    )
RETURN
    IF (
        SELECTEDVALUE ( 'Financial Overview'[FinOverFinLevel1] ) = "Assets Under Management",
        SUMX ( CurrentFinPort, 'Financial Overview'[Balance] )
    )

View solution in original post

5 REPLIES 5
Greg_Deckler
Super User
Super User

@Anonymous If you post it as text, sure.


@ me in replies or I'll lose your thread!!!
Check out my External Tool for Power BI Desktop! Microsoft Hates Greg's Quick Measures
YouTube Channel! Microsoft Hates Greg
Check out my latest book!

Anonymous
Not applicable

Hi Greg,

 

AUMBAND =
VAR CurrentPortfolio = 'Financial Overview'[Portfolio]
VAR CurrentFinPort =
FILTER('Financial Overview','Financial Overview'[Portfolio] = CurrentPortfolio)

Return
IF('Financial Overview'[FinOverFinLevel1] = "Assets Under Management",
SUMX(CurrentFinPort,'Financial Overview'[Balance]))

I'd probably rewrite it something like this:

 

AUMBAND =
VAR CurrentPortfolio =
    VALUES ( 'Financial Overview'[Portfolio] )
VAR CurrentFinPort =
    FILTER (
        'Financial Overview',
        'Financial Overview'[Portfolio] IN CurrentPortfolio
    )
RETURN
    IF (
        SELECTEDVALUE ( 'Financial Overview'[FinOverFinLevel1] ) = "Assets Under Management",
        SUMX ( CurrentFinPort, 'Financial Overview'[Balance] )
    )

View solution in original post

Greg_Deckler
Super User
Super User

@Anonymous Wrap your column references in an aggregation like MAX or SUM, etc.


@ me in replies or I'll lose your thread!!!
Check out my External Tool for Power BI Desktop! Microsoft Hates Greg's Quick Measures
YouTube Channel! Microsoft Hates Greg
Check out my latest book!

Anonymous
Not applicable

Hi Greg,

Thank you for your quick reply. Could I trouble to convert it as a measure, Please!!

 

 

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

November Power BI Update 768x460.png

Check it Out!

Click here to read more about the November 2021 Updates!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.