cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Jkaelin Member
Member

Easy Question: How to Write Measure on Multiple Rows

How do I write a measure & break it out as (1st example below) vs. it all being jumbled on the same line (2nd example below)?  When writing the formula, hitting the Enter button doesn't allow me to jump to the 2nd row.  Make sense?  Thank you.  

 

 

Cumulative Return Column = CALCULATE (
SUM(Index_Master_Mo[Value_of_1] ),
FILTER (
ALL (Index_Master_Mo[Excel_EOMonth_Date]),
Index_Master_Mo[Excel_EOMonth_Date] <= MAX ( Index_Master_Mo[Excel_EOMonth_Date])
)
)-1

 

Cumulative Return Column = CALCULATE (SUM(Index_Master_Mo[Value_of_1] ),FILTER (ALL (Index_Master_Mo[Excel_EOMonth_Date]),Index_Master_Mo[Excel_EOMonth_Date] <= MAX (Index_Master_Mo[Excel_EOMonth_Date])))-1

1 ACCEPTED SOLUTION

Accepted Solutions
Sean Super Contributor
Super Contributor

Re: Easy Question: How to Write Measure on Multiple Rows

in PBI you can use => Alt + Enter

 

You can quiclkly format your Measures using http://www.daxformatter.com

 

Use DAX Studio along with the PP Utilitites Tool to document all your Measures

http://daxstudio.codeplex.com/

http://www.sqlbi.com/tools/power-pivot-utilities/

 

Here's a helpful link on how to do this

http://exceleratorbi.com.au/getting-started-dax-studio/

 

Hope this helps! Smiley Happy

View solution in original post

6 REPLIES 6
Sean Super Contributor
Super Contributor

Re: Easy Question: How to Write Measure on Multiple Rows

in PBI you can use => Alt + Enter

 

You can quiclkly format your Measures using http://www.daxformatter.com

 

Use DAX Studio along with the PP Utilitites Tool to document all your Measures

http://daxstudio.codeplex.com/

http://www.sqlbi.com/tools/power-pivot-utilities/

 

Here's a helpful link on how to do this

http://exceleratorbi.com.au/getting-started-dax-studio/

 

Hope this helps! Smiley Happy

View solution in original post

Jkaelin Member
Member

Re: Easy Question: How to Write Measure on Multiple Rows

@Sean

 

Alt+Enter works perfect.  Loved the website recommendation & I plan to use that to help guide me.  Thank you.

SimoneH Frequent Visitor
Frequent Visitor

Re: Easy Question: How to Write Measure on Multiple Rows

Do you know a reason why Alt+Enter doesn't work in formula bar?

 

Jkaelin Member
Member

Re: Easy Question: How to Write Measure on Multiple Rows

I don't know why.  I assume it should work.  Does it not work for you?

Sean Super Contributor
Super Contributor

Re: Easy Question: How to Write Measure on Multiple Rows

@SimoneH

In the DAX (Data View) formula bar => ALT + Enter works

In the Query Editor you can open the Advanced Editor and there Enter works! (no need for ALT)

you can also use Enter when creating a Custom column - in the pop window Enter also works

Query Editor - Enter.png

 

Hope this helps! Smiley Happy

@MarcelBeugcan probably shed some further light onto this Smiley Happy

SimoneH Frequent Visitor
Frequent Visitor

Re: Easy Question: How to Write Measure on Multiple Rows

Thank you Sam for all the details.  After spending some time yesterday researching why Alt+Enter doesn't work in my formula bar... my conclusion was … because of OS (Windows 10). Because I have installed Power BI Desktop on other machine and it works just fine.

Helpful resources

Announcements
Can You Solve These Challenge

Challenge: Can You Solve These?

Find out how to participate in the first Power BI 'Can You Solve These?' challenge.

Community News & Announcements

Community News & Announcements

Get your latest community news and announcements.

Virtual Launch Event

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Community Kudopalooza

Win Power BI Swag with Community Kudopalooza!

Each week, complete activities and be qualified in the drawing for cool Power BI Swag.

Users Online
Currently online: 63 members 1,275 guests
Please welcome our newest community members: