I am new to DAX so my apologies for the basic question....
How can I get the Goal % column to reflect what I have listed in my table?
My table is for Customer and what I think the Goal % should be.
The Customer fields are connected in my Model.
I just want the Goal % to say what I have in my table (for each Customer).
Seems like it should be very simple but I cannot figure it out
You did not post any actual data samples... so it's hard to really say.
but looking at your DAX measure my guess would be that when you take the AVG of the Goal table it is already being filtered by the external context... so you do not get the number you think you should get.
You probably need to use CALCULATE with the ALL function to restore the full table to do the average over.
Goal % = CALCULATE(AVERAGE('Table'[Goal])/100,ALL(Table))
depending on whether you need to remove the filter context for the whole table, or possible just for the Goal column, in which case it would be ALL(Table[Goal])
I'm a personal Power Bi Trainer I learn something every time I answer a question
The Golden Rules for Power BI
Help when you know. Ask when you don't!
Thank you so much for the reply! I am not sure the AVERAGE function is what I need.
I have the Goal % (for each customer) in a table. I am looking for a way to get the straight number from the table into my visual.
Right now, the only options are Sum, Avg, Min, Max, Count, etc.
I just want the exact value but cannot figure out how to do that.
If the percentage values are in a table, then you should be able to write a measure.
As you have discovered measures cannot address a column value directly, because a measure does not have a specific "row context"
But if you place your measure in the table control, then the table (or matrix) will generate a filter context that changes for each row.
You can address that filter context to get the percentage for the row
Percent Value = SELECTEDVALUE(mytable[percentColumn])
or something like that should work
Returns the value when the context for columnName has been filtered down to one distinct value only. Otherwise returns alternateResult.
SELECTEDVALUE(<columnName>[, <alternateResult>])
Help when you know. Ask when you don't!
Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!