Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more
Hi,
I have a table with transaction dates for each customer.
Then I have date table with dates, months, years.
I want to have a new table that will show for each customer his last transaction date per month/year.
If transaction date is missing in one month&year then take previous transaction date.
Example
Result
Thank you!
Mike
Solved! Go to Solution.
Hi @Anonymous
I've had a similar situation, the below helped me solve it. I think the blank date would get resolved by this also.
Proud to be a Super User!
Hi @Anonymous ,
Check the measure below.
Measure = CALCULATE(MAX('Table'[date]),FILTER(ALLEXCEPT('Table','Table'[customer]),MONTH('Table'[date])<=SELECTEDVALUE('CALENDAR'[month])&&YEAR('Table'[date])=SELECTEDVALUE('CALENDAR'[year])))
Best Regards,
Jay
@Anonymous , Try with a date table. Month year should be there in month year table
Max till year
YTD = CALCULATE(MAX(Table[Transaction Date]),DATESYTD('Date'[Date],"12/31"))
max across year
Cumm = CALCULATE(MAX(Table[Transaction Date]),filter(date,date[date] <=maxx(date,date[date])))
To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :
https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions
https://www.archerpoint.com/blog/Posts/creating-date-table-power-bi
https://www.sqlbi.com/articles/creating-a-simple-date-table-in-dax/
See if my webinar on Time Intelligence can help: https://community.powerbi.com/t5/Webinars-and-Video-Gallery/PowerBI-Time-Intelligence-Calendar-WTD-YTD-LYTD-Week-Over-Week/m-p/1051626#M184
Appreciate your Kudos.
Hi @Anonymous
I've had a similar situation, the below helped me solve it. I think the blank date would get resolved by this also.
Proud to be a Super User!
Check out the April 2025 Power BI update to learn about new features.
Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.
User | Count |
---|---|
107 | |
68 | |
48 | |
47 | |
44 |