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!

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])
)
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!