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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
cblanton45
Frequent Visitor

Calculate SUM of next level

My data set is fairly simple...I have a Level (FL) and Experience amount.  All I want to to do is calculate the SUM of Experience of the next level (e.g. If FL = 4, calculate the SUM of FL 5) .  In the visuals, a user needs to be able to select FL from a slicer and display the SUM of the next level.

 

2019-07-30_9-42-06.jpg

1 ACCEPTED SOLUTION

@cblanton45 sorry missed that, add ALL() before Filter condition.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

View solution in original post

4 REPLIES 4
parry2k
Super User
Super User

@cblanton45 try following DAX measure

 

Sum of Next Level = 
VAR __currentLevel = MAX( Table[FL] )
VAR __nextLevel = __currentLevel + 1
RETURN
CALCULATE(
SUM( Table[Experience]),
Table[FL] = __nextLevel
)


Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

I believe the formula is working but issue is that when I select a FL from the slicer, it filters out the data needed to calculate this measure for the next level.  Is there some form of ALL I can insert that will honor the filter selection for calculating the measure?

@cblanton45 sorry missed that, add ALL() before Filter condition.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Thanks! This is the final formula I used that worked

Med Next Level = 
VAR __currentLevel = MAX( Sheet1[FL] )
VAR __nextLevel = __currentLevel + 1
RETURN
CALCULATE(
MEDIAN(Sheet1[Experience]),
FILTER(ALL(Sheet1),Sheet1[FL] = __nextLevel)
)

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.