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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
quintans1
Frequent Visitor

Calculated Column to provide a minimum numerical value based on multiple criteria

I need assistance in creating a calculated column that will show the minimum value (Location Number) based on multiple criteria (Category Number, Country, Location Number). I am hoping I can also see the minimum numerical value when a row has no value.

 

So for each Category/Country combo, the calculated column returns back the minimum Location Number, I need it to provide the minimum location number in the event the Location Number is blank.

 

calculatedcolumn.PNG

1 ACCEPTED SOLUTION

Thank you very much, the dax for the column works in your PBIX, but when I try to employ what you wrote to my work pbix, the calculated column partially works. Confusing since I see that it works in what you provided.

 

I ended up using DAX like this below in my work pbix and I get the same result in your dax and works completely in my work pbix.

test_column = CALCULATE (
    MIN (Data[Location Number]),
    ALLEXCEPT (Data,Data[Category Number],Data[Country])
)

View solution in original post

2 REPLIES 2
Jihwan_Kim
Super User
Super User

Hi, I am not sure if I understood you question correctly, but please check the below picture and the attached pbix file.

 

Jihwan_Kim_0-1688009355846.png

 

 

Expected result CC =
CALCULATE (
    MIN ( Data[Location Number] ),
    INDEX (
        1,
        FILTER (
            SUMMARIZE ( Data, Data[Category Number], Data[Country], Data[Location Number] ),
            Data[Location Number] <> BLANK ()
        ),
        ORDERBY ( Data[Location Number], ASC ),
        DEFAULT,
        PARTITIONBY ( Data[Category Number], Data[Country] )
    )
)

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

Thank you very much, the dax for the column works in your PBIX, but when I try to employ what you wrote to my work pbix, the calculated column partially works. Confusing since I see that it works in what you provided.

 

I ended up using DAX like this below in my work pbix and I get the same result in your dax and works completely in my work pbix.

test_column = CALCULATE (
    MIN (Data[Location Number]),
    ALLEXCEPT (Data,Data[Category Number],Data[Country])
)

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.