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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

MIN of another calculated Measure (not as an actual table in the data model)

Hi PBI Community,

 

here's my issue:

 

I created the "Inventory" measure. Down below you can see how one of the visuals (matrix) based on this measure looks ...

 

Month           Inventory

January3550
February2730
March38551
April5767
May4736
June18336
July42701
August277
September43620
October17074
November49214
December5890

 

Now, I want to create a new measure to give me the smallest number from that visual. 

 

The MIN function, however, only accepts references to columns. So, do I really need to create a table first?

 

Many thanks in advance!

 

1 ACCEPTED SOLUTION
ibarrau
Super User
Super User

Hi, sure you can. First you need to generate that table in dax and the use the min. Something like this:

MINX ( 
    SUMMARIZE(
        Table; Table[Month]
        ; "@Inventory"; [InventoryMeasure] )
    ; [@Inventory] 
)

Using SUMMARIZE you can generate a table like the one you show and then use MINX to aggregate the new column [@Inventory].

 

Regards,

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Happy to help!

LaDataWeb Blog

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

you can create a formula that uses summarize

 

https://docs.microsoft.com/en-us/dax/summarize-function-dax

 

create table a var and then use that table to get min values.

 

Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks.

My Recent Blog - https://community.powerbi.com/t5/Community-Blog/Comparing-Data-Across-Date-Ranges/ba-p/823601

ibarrau
Super User
Super User

Hi, sure you can. First you need to generate that table in dax and the use the min. Something like this:

MINX ( 
    SUMMARIZE(
        Table; Table[Month]
        ; "@Inventory"; [InventoryMeasure] )
    ; [@Inventory] 
)

Using SUMMARIZE you can generate a table like the one you show and then use MINX to aggregate the new column [@Inventory].

 

Regards,

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Happy to help!

LaDataWeb Blog

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors