Forum Discussion
TotunG
Resolver I
3 years agoGetting value which is second highest date through date relationship table
Hi, I have a main data table which has a relationship with a reference date table that is used to 'slice' values to compare them in a waterfall chart. I essentially need a measure to give me ...
- Anonymous3 years ago
Hi TotunG ,
According to your description, here are my steps you can follow as a solution.
(1) My test data is the same as yours.
(2) We can create two measures.
rank = RANKX(ALLSELECTED('Main Data'),'Main Data'[Date],MAX('Main Data'[Date]),DESC,Dense)second highest date value = CALCULATE(MAX('Main Data'[Value]),FILTER(ALLSELECTED('Main Data'),'Main Data'[rank]=2))(3) Then the result is as follows.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
TotunG
Resolver I
3 years agoThank you for your input, although I think its a bit more complex due to the relationship of the date table that I dont think you cover.
This Sample PBI might explain it better:
https://drive.google.com/file/d/19KDNuA7CRElc-O1H8WwschGNoU29qUBv/view?usp=sharing
Anonymous
3 years agoNot applicable
Hi TotunG ,
The two tables in your pbix file do not have any date columns, please check your pbix file.
Best Regards,
Neeko Tang