Skip to main content

Power BI

New

Rankx with What If ... Combine Top & Bottom

Vote (1) Share
's profile image

on 06 Mar 2018 18:49:31

What If parameters allow the user to quickly adjust the number of rows that are displayed in RANXX and TOPN.
Allowing the What IF Parameter to go negative provides a concise way of combining both Top & Bottom performers in one measure and one Visual. Negative implies Bottom N.

This can be done with present functionality by using VAR and having 2 separate RANKX statements, one for Top and another for Bottom, withing the measure.

The coding could be reduced to a single RANKX by allowing a VAR definition to be used as the Order argument (DESC/ASC) in the RANKX statement.

From the outside it doesn't look like a major change?