Forum Discussion
FIRSTDATE and LASTDATE
Hi SNV,
It seems like I can't access to the shared file(no permission to access your sharepoint), can you please upload it to onedrive and share the link?
Regards,
Xiaoxin Sheng
Edited my first post, it seems to work.
Kind regards
- Anonymous8 years agoNot applicable
Hi SNV,
After I modify your formula, chart graph seems works again, you can take a look at below formula.
AVG MAX DATE = VAR Tbl3 = SUMMARIZE ( FILTER ( 'SampleData', [ZRM.Date] = [Maximum Date] ), [Group], [ZRM.ID], "AVG_PER_ID_ON_MAX_DATE", AVERAGE ([SCORE] ) ) RETURN AVERAGEX ( Tbl3, [AVG_PER_ID_ON_MAX_DATE] ) AVG MIN DATE = VAR Tbl2 = SUMMARIZE ( FILTER ( 'SampleData', [ZRM.Date] = [Minimum Date] ), [Group], [ZRM.ID], "AVG_PER_ID_ON_MIN_DATE", AVERAGE ( [SCORE] ) ) RETURN AVERAGEX ( Tbl2, [AVG_PER_ID_ON_MIN_DATE] )Notice:
1. It seems original table column name not works on filtered table, you can remove prefix table name to direct use column name, power bi will recognize to the filtered temp table.2. I attached the modified sample file below.
Regards,
Xiaoxin Sheng
- SNV8 years agoAdvocate I
Hello Xiaoxin Sheng,
Thanks for your fast response.
I took a look at your file, but I'm still not getting the correct averages.
Maybe I didn't explain it well enough.
If I use the date slicer to filter my averages for only 2017, I get the output below:
The problem is that a date that is earlier than the selected range is used within the measures.
When I filter the rows in the query editor to only dates in 2017 I get the following output:
For the same ID the date now is within 2017, which is what I want.
Does this explain my problem more clearly?
Kind regards
- Anonymous8 years agoNot applicable
HI SNV,
I can't got your logic.
In your visual, you use the 'group' as the axis, so this graph shows summarized result by group column. When you filter on matrix by specific ID, then graph will change.
BTW, if you want to use show the correspond result, you need to modify your chart and use 'ID' as the axis.
Regards,
Xiaoxin Sheng