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
Power BI December 2021 Update_carousel 768x460.jpg

Check it Out!

Click here to read more about the December 2021 Updates!

Jan 2022 Dev Camp 768x460 copy.png

Power BI Dev Camp- January 27th, 2022

Mark your calendars and join us for our next Power BI Dev Camp!

UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Top Solution Authors
Top Kudoed Authors