Forum Discussion
Automatically count the number of consecutive points decreasing / increasing
HI LR,
Current power bi not contains similar feature to achieve your requirement.
In my opinion, I'd like to suggest you write calculated column to check your records status to add category tag when they suitable for your requirement.
After these steps, use above column as chart legend and manually modify its data color of tagged category.
BTW, current power bi not support use multiple value field and legend field at same time.
Regards,
Xiaoxin Sheng
Hi Anonymous,
Thank you for your response !
I tried to create 2 new columns : one for consecutive increasing points and one for consecutive decreasing points.
I created a third column too. It serves to highlight areas on the graph :
IF (
OR (
[PointsIncreasing] >= 6 ;
[PointsDecreasing] >=6
);
'Table'[Value] ;
Blank()
)
Do you have any idea or research leads ?
Regards
- Anonymous8 years agoNot applicable
Hi LR,
Unfortunately, current charts not support use multiple values and legend at same time. I don't think you can use that method to achieve your requirement.Can you please share some sample file to test and coding formula?
Regards,
Xiaoxin Sheng- LR8 years agoFrequent Visitor
Hi Anonymous,
You can find a sample file at this adress :
https://drive.google.com/open?id=1DmEpQRlIp6SwSeJ1_2uwVrsy0mhTjMjSo52ABetGpCY
Thank you,
Regards- Anonymous8 years agoNot applicable
HI LR,
As I said, you can simply use below column formula to mark tags of each records.
Category = VAR previous = MAXX ( FILTER ( ALL ( Table1 ), [Type] = EARLIER ( [Type] ) && [Date] < EARLIER ( [Date] ) ), [Values] ) VAR result = [Values] - previous RETURN IF ( previous <> BLANK (), IF ( result > 0, "increasing", IF ( result < 0, "decreasing" ) ) )BTW, current power bi not support multiple legends or combine use legend fields and multiple value fields, so I think you can't use these columns to create graph in power bi .
Regards,
Xiaoxin Sheng