Finding the latest date within the current user's selection is as simple as var maxd = MAX('Table'[Date])
A bigger problem is the logic for when there're several rows for this date.
And the biggest problem is that DAX measures don't return rows - they return single values. So to reproduce your whole row in a say pivot table you'll have to create a measure for each of the columns. Or perhaps you'll be able to list the columns in some helper column elsewhere, put it on pivot table's columns axis and author a clever single measure that'll get the value corresponding to the column's name.
SSAS tabular model - Get the latest data row based on the Select date hierarchy
Bernard CP Raj
1
Reputation point
Hi All,
I am new to SSAS tabular model hoping for a solution following problem;
This my data set
]2
On the basis of select in Date hierarchy, cube need to retrieve the entire latest row
For example ;
IF Year ALL was selected

IF 2020 Quarter 1 was selected 
OR the month March'2020 was Selected

Looking select the latest row for selected Date hierarchy
Thanking you in advance
SQL Server Analysis Services
SQL Server Analysis Services
A Microsoft online analytical data engine used in decision support and business analytics, providing the analytical data for business reports and client applications such as Power BI, Excel, Reporting Services reports, and other data visualization tools.
1 answer
Sort by: Most helpful
-
Alexei Stoyanovsky 3,416 Reputation points
2022-08-22T06:14:49.43+00:00