Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hey everyone, what's up?
I have a table that looks like this:
The values goes, untill year 2019 month 9.
There's only one row for each month-year combination. That means that DataReferencia field is unique (key).
It's used for restatement of currency values.
It's called 'INPC'.
I need a DAX formula that gets the first value of a specified column (in the case, the column NUMERO INDICE) of a filtered given table (in the case, the 'INPC' table).
To be clear, here's what I'm looking for:
[FUNCTION I'M LOOKING FOR] ( 'INPC'[NÚMERO ÍNDICE]; TOPN( 1; 'INPC'; 'INPC'[DataReferencia]; DESC ) )
The filtered table I'm passing is a one row table, given by the TOPN function.
That made, I need to get the corresponding value of the NÚMERO ÍNDICE column.
To be short, I need a function that will return me the NÚMERO ÍNDICE value corresponding to the most recent date of DataReferencia field. I used TOPN to give me the row corresponding to the most recent date. Now I need a function that gets the unique value of the NÚMERO ÍNDICE column from this filtered table.
Any ideas?
Solved! Go to Solution.
Hi @Anonymous ,
Not sure if I understand this, but if you create this measure, you will be able to get the Numero Indice from the row that contains the latest date in the table.
Let me know if you have any questions.
If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos are nice too.
Nathaniel
Numero Indice measure = CALCULATE(max(Numero[Numero Indice]),Filter(Numero,Numero[Date]=MAX((Numero[Date]))))
I called my table Numero.
Proud to be a Super User!
Hi @Anonymous ,
Not sure if I understand this, but if you create this measure, you will be able to get the Numero Indice from the row that contains the latest date in the table.
Let me know if you have any questions.
If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos are nice too.
Nathaniel
Numero Indice measure = CALCULATE(max(Numero[Numero Indice]),Filter(Numero,Numero[Date]=MAX((Numero[Date]))))
I called my table Numero.
Proud to be a Super User!
User | Count |
---|---|
57 | |
21 | |
19 | |
17 | |
16 |
User | Count |
---|---|
85 | |
80 | |
52 | |
37 | |
22 |