Forum Discussion

AB-Learner's avatar
AB-Learner
Frequent Visitor
2 years ago
Solved

Report based on earliest date (year)

I have a table with a reference field (multiple values).  For each record, there is a date field.  The date field, for the same value of a reference field, can have different values.

 

Example:

 

Reference fieldDate
A1232022-03-17
A1232022-05-15
A1232023-09-14
A1232024-01-25
A1232024-02-18
A0582021-07-15
A9822024-04-23
A5872022-03-21
A9822024-03-28
A5872024-01-15

 

I want to have a report that shows me for each "reference field" value, the first year in which it appeared.  And then a total per year.  Based on the above table, the output would be as follows:

 

Reference field2021202220232024
A0581   
A123 1  
A587 1  
A982   1
TOTALS12 1

 

Being a newbie in PowerBI related queries/tables/reports, the above simple need is working out to be quite difficult for me.  Any help towards this is appreciated.

2 Replies

    • AB-Learner's avatar
      AB-Learner
      Frequent Visitor

      Thanks.

       

      This solution works well.  Of course, I have not fully understood the logic but that is because I do not know fully well what does the various functions (SUMX, SUMMARIZE, ...) do.  I will do my self-reading to understand those functions - but I confirm that your proposed solution works well for my need.