12-05-2018 04:34 AM
Thanks you @AlB for the take on this challenge! As you wrote, your measure shows the last status only for the whole period, which is the reason why my approach was to start by grouping the values. I am not sure how to solve this tricky selection part though..
12-06-2018 02:20 PM
I am quite curious about the
that you show as I had not seen it before. So you can access the components of date-type data with than syntax? Is this syntax used in other ways too or with other data types? Can I read about it somewhere?
Is the above actually a shortcut for:
Thanks very much
12-06-2018 05:13 PM
Yes, you could use this formula must before create a relationship with a date table.
, of course, you could use your formula,
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
12-07-2018 01:27 AM
Is thet syntax that you provide, with the dot, only available for dates or in others cases as well? That's what I was most curious about.
12-07-2018 06:10 AM
@AlBThe measure your provided shows the max status for the whole period. If date slicer de-selects this max interaction, it will disapear and will not get recalculated. Maybe I am bad at explaining what I want to achieve, so let me illustrate - we have a client with 3 interactions:
If the date slicer has selected 12.01 - 12.05, the max interaction in this range is xyz3 and the respective max status = "D", therefore I need the output to be like this:
However, now suppose I adjust date slicer to 12.01 - 12.04 The max interaction in this range is xyz2 and the respective max status = "C", therefore I need the output to look like this:
This is what I am trying to achieve. I think that your measure is close to what I need, but I lack the knowledge to tweak it.
12-20-2018 04:07 AM - edited 12-20-2018 04:08 AM
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