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
Venkat_s
New Member

Sum of Minimum Count By YearMonth and Product

Team,

 

I am struggling to get Minimum value (SUM) by the group.

 

Here is the Data:

 

Venkat_s_0-1598284881247.png

 

Desired output :

 

1) When the user selects Start Year & Month (for Active) it should show 200 (Sum of Minimum value on D Year & Month) irrespective of Product.

2) When the user selects Start Year & Month (for Active) and Product then it should show 200 (minimum value).

 

Thanks,

 

Regards,

Venkat

1 ACCEPTED SOLUTION
Icey
Community Support
Community Support

Hi @Venkat_s ,

 

Please check if this is what you want:

Measure =
IF (
    ISFILTERED ( 'Table'[Product] ),
    CALCULATE (
        MIN ( 'Table'[Count] ),
        FILTER (
            ALLSELECTED ( 'Table' ),
            'Table'[D Year&Month] = MAX ( 'Table'[D Year&Month] )
                && 'Table'[Product] = MAX ( 'Table'[Product] )
        )
    ),
    CALCULATE (
        MIN ( 'Table'[Count] ),
        FILTER (
            ALLSELECTED ( 'Table' ),
            'Table'[D Year&Month] = MAX ( 'Table'[D Year&Month] )
        )
    )
)

measur.gif

 

BTW, .pbix file attached.

 

 

Best regards

Icey

 

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

View solution in original post

4 REPLIES 4
amitchandak
Super User
Super User

@Venkat_s , Not very clear

Try a measure like

sumx(summarize(filter(table, table[status] ="Active"),table[Product],"_1", max(Table[count])),[_1])

I mean, If the user selects Start Year&Month The the Minimum Count (Sum of ) value should be on D month and Product Level (By Month and Year) irrespective of Product.

 

If the user selects Start Year & Month and Product Then the Minimum count (Sum of) should be shown on Product Level.

 

Start Year & Month are in Slicer.

 

Keeping Status (Picking only Active) in Graph Filters.

 

Thanks! 

Icey
Community Support
Community Support

Hi @Venkat_s ,

 

Please check if this is what you want:

Measure =
IF (
    ISFILTERED ( 'Table'[Product] ),
    CALCULATE (
        MIN ( 'Table'[Count] ),
        FILTER (
            ALLSELECTED ( 'Table' ),
            'Table'[D Year&Month] = MAX ( 'Table'[D Year&Month] )
                && 'Table'[Product] = MAX ( 'Table'[Product] )
        )
    ),
    CALCULATE (
        MIN ( 'Table'[Count] ),
        FILTER (
            ALLSELECTED ( 'Table' ),
            'Table'[D Year&Month] = MAX ( 'Table'[D Year&Month] )
        )
    )
)

measur.gif

 

BTW, .pbix file attached.

 

 

Best regards

Icey

 

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

Hi Amit,

 

Thanks for your quick response.

 

I tried this but it doesn't give required output.

 

for your reference, I am keeping Status as a filter, Start Month Year, Product in Slicer.

 

When the user selects particular start Year& Month by default the minimum (SUM of ) value should be shown on D Month & year Irrespective of Product Until the user selects Product.

 


Thanks!

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.