-
1. Re: When using MAX([data]) I want the corresponding data from the same row.
Jim DehnerFeb 11, 2019 4:23 AM (in response to Robert Rogness)
Good morning
Your viz looks really cool - Thanks for sharing the images but you will always get a faster and more complete response by sharing the twbx workbook so we can see the data and what you are doing
I can see just the start of and LOD that finds the max of something
I think you are trying to find the location that corresponds to the max magnitude in the data by quarter
your lod needs to look by quarter by year and find the max - something like {fixed year(date),quarter(date):Max(Magnitude)} - you may need to include event before the colon if that location by even is what you want)
then you need to compare the magnitude for each event by quarter to the max you just determined and if it matches then take the location -
if [magnitude] = [lod max] then [location] end
you may need to wrap that in an LOD
Since we don't have you book I could not test the formulas so yo may need to play with the syntax a bit
Jim
If this posts assists in resolving the question, please mark it helpful or as the 'correct answer' if it resolves the question. This will help other users find the same answer/resolution. Thank you.
-
2. Re: When using MAX([data]) I want the corresponding data from the same row.
Robert Rogness Feb 11, 2019 6:08 PM (in response to Jim Dehner)I'm using tableau public. How do I share my workbook?
This is my first time working with LOD. I didn't even know what LOD stood for till looked it up.
I created two calculated fields and tried to follow your advice. They said the calculation was valid. But the final output was blank.
-
3. Re: When using MAX([data]) I want the corresponding data from the same row.
Robert Rogness Feb 12, 2019 4:20 AM (in response to Jim Dehner)Here is the workbook.
-
Final.twbx 3.1 MB
-
-
4. Re: When using MAX([data]) I want the corresponding data from the same row.
Jim DehnerFeb 12, 2019 4:43 AM (in response to Robert Rogness)
Hi
see the attached
this formula finds the max by year and quarter
this the locations (Place)
I don't know why you got null returns (you did not include the formula in the posted book) - the usual cause is a null in the data
in text chart form the return this
Jim
If this posts assists in resolving the question, please mark it helpful or as the 'correct answer' if it resolves the question. This will help other users find the same answer/resolution. Thank you.
-
Final_v2018.2.twbx 3.1 MB
-
-
5. Re: When using MAX([data]) I want the corresponding data from the same row.
Robert Rogness Feb 12, 2019 8:09 PM (in response to Jim Dehner)At least I am seeing a location. But it is in a completely different location from where it should be. I tried using the code provided exactly. I then tried changing it. I tried changing datapart to datatrunc. I tried deleting datapart('year', [time])/datatrunc('year', [time]). I tried to change changing MIN( IF ... to MAX( IF ... At this point I am just trying things. Nothing gives me "70km SSW of Kaktovik, Alaska" for the 3.2 magnitude dot at "2018 Q3".
-
6. Re: When using MAX([data]) I want the corresponding data from the same row.
Robert Rogness Feb 12, 2019 8:09 PM (in response to Robert Rogness)Here is the latest workbook.
-
Final3.twbx 3.1 MB
-
-
7. Re: When using MAX([data]) I want the corresponding data from the same row.
Jim DehnerFeb 13, 2019 4:22 AM (in response to Robert Rogness)
at this point I'm sure you will figure it out
Jim