cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Caesareus Frequent Visitor
Frequent Visitor

Measure to summarize MIN

Hi community, Would be great if anybody can help me with my problem. I'm trying to create a visual based on the table 'Prognoselement':

 

Table.jpg

In a matrix visual I want to have the MIN values from the column Adjust per OwnerId and PeriodId. It should look like this:

 

Visual.jpg

With this measare I don't get the MIN, but the sums per period and owner:

 

Commit FC Adj new =
MINX(
            KEEPFILTERS(VALUES(Prognoseelement[PeriodId]));
            CALCULATE(SUM(Prognoseelement[Adjustment]))
)

 

Has anybody an idea how to correct this wrong measure?

Thanks in advance!!!

 

Regards,

Harald

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-lid-msft Super Contributor
Super Contributor

Re: Measure to summarize MIN

Hi @Caesareus ,

 

We can remove the OwnerId from the column filed and change to use the following measure.

 

Commit FC Adj new =
SUMX (
    ADDCOLUMNS (
        DISTINCT ( 'Prognoselement'[OwnerId] ),
        "min", CALCULATE ( MINX ( 'Prognoselement', [Adjustment] ) )
    ),
    [min]
)

9.PNG10.PNG

 

BTW, pbix as attached.

 

Best regards,

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

6 REPLIES 6
adetogni Senior Member
Senior Member

Re: Measure to summarize MIN

that's a overcomplicated MINX

Commit FC Adj new =
MINX(
            Prognoseelement;Prognoseelement[Adjustment]
)

 

your filter groups by OwnerID and Period will filter your rows and MINX will extract the minimum value in that subset

Caesareus Frequent Visitor
Frequent Visitor

Re: Measure to summarize MIN

Hi,

Thank you for your quick response. This works exactly for my description.

 

But would it be possible to change your measure to have the OwnerIds in a slicer and select multiple owners and then get the totals for the minimums of each of them. For a single selection it works, but not for multiple. In the visual there are only PeriodId as rows and Adjust as value. Sorry for not describing this in my 1st post.

 

Best Regards,

Harald

adetogni Senior Member
Senior Member

Re: Measure to summarize MIN

So you want, filtered by A or B the SUM of the MINIMUM value of each PeriodId?

So A would be 500.000 and
B would be 450.000 (for M1) + 750.000 (for M2)?

Otherwise can you explain your expected result?

Caesareus Frequent Visitor
Frequent Visitor

Re: Measure to summarize MIN

A and B can be selected in a slicer. And these should be the results:

Visual2.jpg

v-lid-msft Super Contributor
Super Contributor

Re: Measure to summarize MIN

Hi @Caesareus ,

 

We can remove the OwnerId from the column filed and change to use the following measure.

 

Commit FC Adj new =
SUMX (
    ADDCOLUMNS (
        DISTINCT ( 'Prognoselement'[OwnerId] ),
        "min", CALCULATE ( MINX ( 'Prognoselement', [Adjustment] ) )
    ),
    [min]
)

9.PNG10.PNG

 

BTW, pbix as attached.

 

Best regards,

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Caesareus Frequent Visitor
Frequent Visitor

Re: Measure to summarize MIN

Hi @v-lid-msft ,

 

Thanks a lot for your solution. Works perfectly for me.

 

Best Regards,

Harald

Helpful resources

Announcements
Ask Amir Anything

Exclusive LIVE Community Event No. 2 – Ask Amir Anything

Next in our Triple A series: Ask Amir Netz questions about the latest updates, features and future.

Ask Amanda Anything Q&A

Ask Amanda Anything Q&A

Learn the answers to some of the questions asked during the Amanda Triple A event.

October 2019 Community Highlights

October 2019 Community Highlights

October was a busy month in the community. Read the recap article to learn about some of the events and content.

New Solution Badges

New Solution Badges

Two waves of brand new solution badges are coming! Read the article for more information on our new community badges.

Users Online
Currently online: 182 members 1,895 guests
Please welcome our newest community members: