Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello
I'm creating a column in my table in power bi, one I know how to get the data I want.
I have one customer column, another with the date and another with a specific value. the client repeats itself several times then there are different dates and values.
I'd like to know for each customer on their last date what value it has.
I just have this:
the last date of each client but I don't know how to place in this new column the value you got on your last date.
Solved! Go to Solution.
Hello @stephaniefalvay ,
You can try to create a measure as below screenshot shown to get the value on the most recent date:
Value for latest date per client =
VAR _maxdate =
CALCULATE (
MAX ( 'Table 1'[date] ),
FILTER (
ALLSELECTED ( 'Table 1' ),
'Table 1'[client] = MAX ( 'Table 1'[client] )
)
)
RETURN
CALCULATE (
MAX ( 'Table 1'[Value] ),
FILTER (
ALLSELECTED ( 'Table 1' ),
'Table 1'[client] = MAX ( 'Table 1'[client] )
&& 'Table 1'[date] = _maxdate
)
)
Best regards
Rena
hola,
como seria si quiero crear la columna? con la medida me va bien, pero no puedo hacer una grafica no me deja usar esta medida en Axis
gracias
Hello @stephaniefalvay ,
You can try to create a measure as below screenshot shown to get the value on the most recent date:
Value for latest date per client =
VAR _maxdate =
CALCULATE (
MAX ( 'Table 1'[date] ),
FILTER (
ALLSELECTED ( 'Table 1' ),
'Table 1'[client] = MAX ( 'Table 1'[client] )
)
)
RETURN
CALCULATE (
MAX ( 'Table 1'[Value] ),
FILTER (
ALLSELECTED ( 'Table 1' ),
'Table 1'[client] = MAX ( 'Table 1'[client] )
&& 'Table 1'[date] = _maxdate
)
)
Best regards
Rena
thank you Rena.
but I made a change if I left it so I only had one value in all the customers.
instead of the MAX placeeARLIER (table1[client])
thanks again
Best regards
Hi @Anonymous ,
You are trying to create calculated column or measure? The formula which I provided in my previous post is for measure not calculated column...
Best Regards
Rena
@Anonymous - Seems like you want Lookup Min/Max - https://community.powerbi.com/t5/Quick-Measures-Gallery/Lookup-Min-Max/m-p/985814#M434
If not, Not really enough information to go on, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882
Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.
User | Count |
---|---|
76 | |
75 | |
46 | |
31 | |
28 |
User | Count |
---|---|
99 | |
91 | |
51 | |
49 | |
46 |