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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
sunah132
Helper I
Helper I

Sum up minimum value and 0 value

Hello, 

I'm working on this power BI Matrix and not sure about this step forward. I have brought minimum values of each region's rate based on their dates. I used the formula of

SWITCH (
TRUE (),
ISINSCOPE ( 'Table'[item] ), SUMX ( VALUES ( 'Table'[Date] ), MIN ( 'Table'[Value] ) ),
SUM ( 'Table'[Value] )
)

to get the total rates. The problem I'm facing is that when there's no rate on days for example of 6/5 on Austin, it counts as 0 thus the total becomes 0. Could you please see how this formula can skip the 0 values and still summarize the total?

Thank you very much.

Region1-Jun2-Jun3-Jun4-Jun5-JunExpected TotalCurrent Matrix
Austin101010100400
Dallas0252525251000
Houston202020200800
San Antonio020202020800
Total3075757545300 
1 ACCEPTED SOLUTION

Hi @sunah132 

 

You could try this measure:

Measure_Value = 
IF (
    ISINSCOPE ( 'Table'[Route] ) && ISINSCOPE ( 'Table'[Date] ),
    MIN ( 'Table'[Value] ),
    SUM ( 'Table'[Value] )
)

060902.jpg

 

Regards,
Community Support Team _ Jing
If this post helps, please Accept it as the solution to help other members find it.

View solution in original post

3 REPLIES 3
sunah132
Helper I
Helper I

Thank you for the suggestion!

I tried on your suggestion and I should have mentioned this but there are multiple routes under each region. When I applied on yours, it took the sum including 0 but wasn't able to show the route rate at drill down.

Region1-Jun2-Jun3-Jun4-Jun5-JunTotal
Austin10101010 40
12222 8
23333 12
33333 12
42222 8

Hi @sunah132 

 

You could try this measure:

Measure_Value = 
IF (
    ISINSCOPE ( 'Table'[Route] ) && ISINSCOPE ( 'Table'[Date] ),
    MIN ( 'Table'[Value] ),
    SUM ( 'Table'[Value] )
)

060902.jpg

 

Regards,
Community Support Team _ Jing
If this post helps, please Accept it as the solution to help other members find it.

amitchandak
Super User
Super User

@sunah132 , Try like this once

SUMX ( VALUES ( 'Table'[Date] ),calculate( MIN ( 'Table'[Value] ) ))

Helpful resources

Announcements
Sept PBI Carousel

Power BI Monthly Update - September 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

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