Getting a Row Context Value from a Table

I am trying to get the value of my Net Income into a Card Visual, but it is only giving me a count of the rows. I have tried using Calculate to change the context but it gives me an error. What is the DAX formula that I can use to get the value of net income into a cord. In this case it should be \$37,383.00

You shouldn’t need to change the context. For example, when I put a put a measure like this into a card

`Total Net Sales = sum('Item Value New'[Net Sales])`

it just puts the total of the measure.

This clearly does not work in the context of what I have. I am tryin to extract the row value (actual amount) of EACH Product individually. In this case it is the “Net Income”. either the set up is wrong or I just cannot figure out the DAX formula.

Good day @BenBen2,

Let me see if I am getting it right:

You are trying to get all the products Sales in your card, correct?

For this, I would need to see which measure are you putting on your Card to guide you better for this problem.

Best regards,

Jorge Galindo

I have used the Advanced DAX formula:

`Net Income. = CALCULATE([Actual Amount], 'Income Statement Products'[Products] = "Net Income")`

However my card is returning a blank value, which means something is wrong with the context.

Hi @BenBen2,

Try the next calculate statement:

Net Income. =
CALCULATE([Actual Amount],
FILTER( ‘Income Statement Products’,‘Income Statement Products’[Products] = “Net Income”)

Best regards,

Jorge Galindo

Thanks for the speedy response. I had previously tried that and unfortunately that returns a blank. I believe it is the way my table is structured, but I cannot think of how to restructure it.

I see.

Try that same measure with other products and see if it returns blank too.

Also, try to move your dates filter and see if the results change.

Best regards,

Jorge Galindo

The DAX Formula does not work with anything on this table. I think I need to look at the table structure and unsure that these products are actually in columns and not rows… Thanks for your help.

Hi @BenBen2,

You are welcome, as you said, probably the problem is before the DAX formulas, try to get that model like the best practices Sam shows in his videos:

And is also good to go back-to-basics, I do this every now and then to not lose sight of the simple things:

Best regards,

Jorge Galindo