Forum Discussion

admin11's avatar
admin11
Icon for Memorable Member rankMemorable Member
5 years ago
Solved

How to compute min GP% ?

Hi All I have a table display YTD GP% , May i know how to capture the lowest GP% .   https://www.dropbox.com/s/qksque5j8dibqlq/PBT_V2021_363%20How%20to%20compute%20min%20YTD%20GP.pbix?dl=0 ...
  • selimovd's avatar
    5 years ago

    Hey admin11 ,

     

    you have to build this table first internally and then get the minim value. Try the following measure:

     

    Min GP% =
    VAR tempTable =
        ADDCOLUMNS ( SUMMARIZE ( SALES, SALES[inv] ), "GP% YTD", [GP% YTD] )
    VAR result =
        MINX ( tempTable, [GP% YTD] )
    RETURN
        result

     

     

    If you need any help please let me know.
    If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍

    Best regards
    Denis

    Blog: WhatTheFact.bi

     

    Edit: SamFischer was faster, his solution should work as well 🙂