Forum Discussion
Report filter automatic result
Hi Pchapple,
According to your description, you need to only show most recent event date with add any filter, right?
I have tested it on my local environment, there is no any Minimum and Maximum option for a date value.
So you need to create another table to get only the lastest date for each event, and then use the new created table to create visuals.
Create a column in the original table
LatestDate = CALCULATE(MAX(Latest[DATE]),ALLEXCEPT(Latest,Latest[Event#]))
Then create a new table
LatestEvent = SUMMARIZE(Latest,Latest[Event#])
Add those columns to the new created table.
LatestDate = LOOKUPVALUE(Latest[LatestDate],Latest[Event#],LatestEvent[Event#])
RevCat1 = LOOKUPVALUE(Latest[RevCat1],Latest[DATE],LatestEvent[LatestDate],Latest[Event#],LatestEvent[Event#])
RevCat2 = LOOKUPVALUE(Latest[RevCat2],Latest[DATE],LatestEvent[LatestDate],Latest[Event#],LatestEvent[Event#])
RevCat3 = LOOKUPVALUE(Latest[RevCat3],Latest[DATE],LatestEvent[LatestDate],Latest[Event#],LatestEvent[Event#])
RevCat4 = LOOKUPVALUE(Latest[RevCat4],Latest[DATE],LatestEvent[LatestDate],Latest[Event#],LatestEvent[Event#])
RevCat5 = LOOKUPVALUE(Latest[RevCat5],Latest[DATE],LatestEvent[LatestDate],Latest[Event#],LatestEvent[Event#])
Regards,
Charlie Liao
Thanks v-caliao-msft
When you are referecning the table Latest... for example...
LatestDate = CALCULATE(MAX(Latest[DATE]),ALLEXCEPT(Latest,Latest[Event#]))
What table are you refering to? Is it the original table? When I try to create the new column in the original table as you described, its giving me an error.
Sorry for the newbie questions...
Paul
- v-caliao-msft10 years agoMicrosoft Employee
Hi Pchapple,
Yes, create calculated column in the original table. Please share us the error message, so that we can make further analysis.
Regards,
Charlie Liao
- Anonymous10 years agoNot applicable
Have created the column as suggested however the process for creating a table seems unclear. Maybe Im not creating the table rtight, but it does not seem that the formulae works when I use ENTER DATA to create a new table.
You say "Then create a new table
LatestEvent = SUMMARIZE(Latest,Latest[Event#])" however this does not seem to return any results when pasted into the 1st cellThanks
- v-caliao-msft10 years agoMicrosoft Employee
Hi Pchapple,
I have create a table by using Enter Data, everything works fine. Here are the steps for you reference.
- Create a table using Enter Data (change the table name to Latest) and then click Loda button.
- Click Data on the left pane, and click Modeling the click New Column. Type the DAX below.
LatestDate = CALCULATE(MAX(Latest[DATE]),ALLEXCEPT(Latest,Latest[Event#])) - Click New Table and type the DAX below.
LatestEvent = SUMMARIZE(Latest,Latest[Event#]) - Add those columns to the new created table.
LatestDate = LOOKUPVALUE(Latest[LatestDate],Latest[Event#],LatestEvent[Event#])
RevCat1 = LOOKUPVALUE(Latest[RevCat1],Latest[DATE],LatestEvent[LatestDate],Latest[Event#],LatestEvent[Event#])
RevCat2 = LOOKUPVALUE(Latest[RevCat2],Latest[DATE],LatestEvent[LatestDate],Latest[Event#],LatestEvent[Event#])
RevCat3 = LOOKUPVALUE(Latest[RevCat3],Latest[DATE],LatestEvent[LatestDate],Latest[Event#],LatestEvent[Event#])
RevCat4 = LOOKUPVALUE(Latest[RevCat4],Latest[DATE],LatestEvent[LatestDate],Latest[Event#],LatestEvent[Event#])
RevCat5 = LOOKUPVALUE(Latest[RevCat5],Latest[DATE],LatestEvent[LatestDate],Latest[Event#],LatestEvent[Event#])
Regards,
Charlie Liao
- Create a table using Enter Data (change the table name to Latest) and then click Loda button.