Forum Discussion
Anonymous
7 years agoNot applicable
Getting a value from dynamic date
I'm hoping somebody can help. I have seen a lot of people trying to do something similar but every solution i have tried doesn't seem to work for me. What I am trying to achieve: I have a table...
v-chuncz-msft
7 years agoCommunity Support
Anonymous ,
You may try using RANKX.
https://community.powerbi.com/t5/Desktop/IF-AND-dax-Formula/m-p/293991#M129654
Anonymous
7 years agoNot applicable
Hi,
Thanks for the reply. I tried to adapt the example you showed to my data, it seemed to crash my machine, i'm guessing due to the amount of data I have in there and the fact it is trying to run this on every row.
Code i tried is:
Column =
IF (
RANKX (
FILTER ( Tbldatastore, Tbldatastore[DateTime] < EARLIER ( Tbldatastore[7days] )
&& Tbldatastore[name] = EARLIER (Tbldatastore[Name]) ),
Tbldatastore[Index],
,
ASC
)
= 1,
Tbldatastore[Used],
0
)