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

Re: Condition in a measure - how to ignore blank nominator?

@erik_tarnvik, I have just applied the new solution, but it looks like this time again the subtotal reverts back to the total (includes sum from the blanks). Example below.

 

Capture.PNG

 

Thanks again for all this help, I am new with DAX language and all this back and forth helps me to learn something new eery time!

Really appreciate it!

Highlighted
erik_tarnvik Established Member
Established Member

Re: Condition in a measure - how to ignore blank nominator?

Hi @katalay, you are right, I failed to see that side effect. Turned out I struggled a little to solve this and had to take a different approach. I am still not satisfied that this is the simplest possible solution but it does work using my example data:

ALL_2016_NEW = CALCULATE (
    SUM ( YOY[MKT_2016] ),
    SELECTCOLUMNS(FILTER (
        SUMMARIZE(YOY,YOY[Month],YOY[MKT_2017]),
        YOY[MKT_2017] <> 0),"Month", YOY[Month])
)

View solution in original post

katalay Frequent Visitor
Frequent Visitor

Re: Condition in a measure - how to ignore blank nominator?

@erik_tarnvik, this worked great! 

 

Thank you for all the help, it was very good learning all of these!

Helpful resources

Announcements
Exclusive LIVE Community Event #3 – Ask Arun Anything

Exclusive LIVE Community Event #3 – Ask Arun Anything

Join us in the third Triple A event!

Meet the 2020 Season 1 Power BI Super Users!

Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

January 2020 Community Highlights

January 2020 Community Highlights

Make sure you didn't miss any of the things that happened in the community in January!

Top Solution Authors
Top Kudoed Authors