Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
DCPics
Helper I
Helper I

Creating a measure that calls another measure......

Hello,

 

I am hoping you can help me.  I have a table with a ton of data and I'm trying to create one measure that calculates what I need correctly.

 

So, I have a column named "Key", and based on the value of "Key", I need my other column "Results" to perform the proper math.  I have 5 measures created with the proper formulas, however I don't know how to call them.

 

My key is either "PAPER-FT", "PAPER-LB", "FILM-FT", "FILM-LB", or "FOAM-LB", and the measures I have created are called the identical name so it stays easy (so I thought).  So if Key = "PAPER-FT" I want it to run the calculation in my measure "PAPER-FT", etc.

 

I konw how to do it with a calculated column, and it works, however it's so big that if I try to add anymore columns my BI crashes and says it is out of memory.  I know that's b/c it has to do the math for all those calculations then assign them to each row.  That is why I am trying to do this with a measure, but I'm stumped.   

 

I hope I explained this clear enough, please let me know if you have any questions, and thank you very much for your help with this!

1 ACCEPTED SOLUTION
Nathaniel_C
Super User
Super User

Hi @DCPics

Try this: Dummied up two measures and called them from the third.
Let me know if you have any questions.

If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos 👍are nice too.
Nathaniel

 

 

Paper-FT calc = 1+2

 

 

Paper-LB calc = 1-2

 

 

Results = IF(MAX(myTable[Type])= "Paper-FT",[Paper-FT calc],IF(max(myTable[Type])="Paper-LB",[Paper-LB calc]))​

 



resultws.PNG





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

4 REPLIES 4
Nathaniel_C
Super User
Super User

Hi @DCPics

Try this: Dummied up two measures and called them from the third.
Let me know if you have any questions.

If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos 👍are nice too.
Nathaniel

 

 

Paper-FT calc = 1+2

 

 

Paper-LB calc = 1-2

 

 

Results = IF(MAX(myTable[Type])= "Paper-FT",[Paper-FT calc],IF(max(myTable[Type])="Paper-LB",[Paper-LB calc]))​

 



resultws.PNG





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Thank you very much for your help with this!  I really appreicate it.  I didn't realize you could do IF's in a measure.

Hi @DCPics , you are welcome! 
Try @MattAllington 's book, Supercharge Power BI.  

Nathaniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Thanks for the tip on the book, I'm going to look it up now.  Thanks again for the help.

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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

Top Solution Authors