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

Shape the future of the Fabric Community! Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions. Take survey.

Reply
Anonymous
Not applicable

How to get Bottom M 1 excluding zeros

Hi,

I am trying to get the next bottom ranked value that is not zero. This is what I currently have written to return the first ranked lowest value.

Least COUNT =
CALCULATE(
    Audit[Sum Audits and Entries],
    FILTER(
        System_Users,
        RANKX(
            System_Users,
            Audit[Sum Audits and Entries],,
            ASC,
            DENSE
        ) = 1
    )
 ) + 0
Results
IGotTheP0werBI_0-1664226776926.png
Need it to return 31. I am new to power BI so any help is greatly appreciated.
IGotTheP0werBI_1-1664226915193.png

 

 

4 REPLIES 4
Anonymous
Not applicable

Is there a way to write something that says
IF result = 0 then 

    FILTER(
        System_Users,
        RANKX(
            System_Users,
            Audit[Sum Audits and Entries],,
            ASC,
            DENSE
        ) = 2 
Else 1 
lazurens2
Frequent Visitor

Maybe this to return positives only into the measure : 

Least COUNT =
VAR _rank = CALCULATE(
    Audit[Sum Audits and Entries],
    FILTER(
        System_Users,
        RANKX(
            System_Users,
            Audit[Sum Audits and Entries],,
            ASC,
            DENSE
        ) = 1
    )
 ) + 0
VAR Result = If ( _rank > 0 , _rank )
Return 
     Result 

Good luck !

Anonymous
Not applicable

Great thought. Unfortunately it just removes the results with zero.

IGotTheP0werBI_0-1664286348683.png

 

Anonymous
Not applicable

IGotTheP0werBI_0-1664227228701.png

Visualization Filters 

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.