Forum Discussion
Anonymous
7 years agoNot applicable
Final client status by grouping on selected date range
Hi, I am fairly new Power BI user, currently working on interesting piece of DAX logic, which should not cause too much hasle, but I feel like I missing something in my code and cannot find out ...
- Anonymous7 years ago
Hello all,
I have found solution to my problem. Here is the code:
CountOfMaxStatus = COUNTROWS( FILTER ( TestData; TestData[TimeStamp] = CALCULATE ( MAX ( TestData[TimeStamp] ); FILTER(ALL(TestData);TestData[Client] = EARLIER ( TestData[Client])); FILTER(ALL(TestData);TestData[TimeStamp]>=MIN(DateTimeDimension[TimeStamp])); filter(ALL(TestData);TestData[TimeStamp]<=MAX(DateTimeDimension[TimeStamp])) ) ))Here is link to the pbix file if you want to see it in the action: http://www.filedropper.com/maxstatusmeasure
Thanks AlB and v-lili6-msft for the help.
Anonymous
7 years agoNot applicable
Hello all,
I have found solution to my problem. Here is the code:
CountOfMaxStatus = COUNTROWS(
FILTER (
TestData;
TestData[TimeStamp]
= CALCULATE (
MAX ( TestData[TimeStamp] );
FILTER(ALL(TestData);TestData[Client] = EARLIER ( TestData[Client]));
FILTER(ALL(TestData);TestData[TimeStamp]>=MIN(DateTimeDimension[TimeStamp]));
filter(ALL(TestData);TestData[TimeStamp]<=MAX(DateTimeDimension[TimeStamp]))
)
))Here is link to the pbix file if you want to see it in the action: http://www.filedropper.com/maxstatusmeasure
Thanks AlB and v-lili6-msft for the help.
AlB
Community Champion
7 years agoAnonymous
Cool. Thanks for sharing.