Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi
I need help to take the latest entry per week form a table so I can use it in a line chart.
My table look like this and it updates two times per day
What I need is for week 45 it gives me the data from index 2, for week 46 the data from index 6 and for week 47 the data from index 10 and so on as the table grows. Allways the latest entry for each week.
Hope you can help me.
Thank you.
Solved! Go to Solution.
HI @KLJ
This is one simple way of doing this
Add a Calculated Column which will RANK days for each Week.
Then you slice the Entire Table with RANK 1
Rank_by_Date = RANKX ( FILTER ( TableName, TableName[Week] = EARLIER ( TableName[Week] ) ), TableName[Load Date], , DESC, DENSE )
if you have a Calendar-table in your model, you can create a measure with LASTDATE like described here: http://tinylizard.com/dax-lastdate-function/ and add the week-column to your report.
Imke Feldmann (The BIccountant)
If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!
How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries
HI @KLJ
This is one simple way of doing this
Add a Calculated Column which will RANK days for each Week.
Then you slice the Entire Table with RANK 1
Rank_by_Date = RANKX ( FILTER ( TableName, TableName[Week] = EARLIER ( TableName[Week] ) ), TableName[Load Date], , DESC, DENSE )
Thank you. That did it.
Thank you for the link. yet another source of educational information on Power BI.
Best regards Kim
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
113 | |
97 | |
85 | |
70 | |
61 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |