Forum Discussion
vasu6811
9 years agoFrequent Visitor
not able to display graph using measure
Hi All, I am facing an issue in Power BI Desktop. I have created a measure for calculating last status based on timestamp for each employee. Now I want to draw a bar chart to display count of emp...
v-jiascu-msft
Microsoft Employee
9 years ago
Hi,
At the first glance, it's very easy. But there are many tricks. A calculated column is recommended. Here is the formula. Please have a try.
IsLatest = CALCULATE ( IF ( COUNT ( 'Sample'[Datestamp] ) = 1, 1, 0 ), FILTER ( 'Sample', 'Sample'[Datestamp] >= EARLIER ( 'Sample'[Datestamp] ) && 'Sample'[EmployeeId] = EARLIER ( 'Sample'[EmployeeId] ) ) )
Best Regards.
Dale