Skip to main content
Announcements
See why Qlik is a Leader in the 2024 Gartner® Magic Quadrant™ for Analytics & BI Platforms. Download Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

I want to count the rising edge of a line chart

I want to count the rising edge of a line chart

There is a line chart as shown below.

Please tell me how to count the number of rising parts of this graph.

In the case of the graph below, it becomes count 3.

WS000969.JPG

1 Solution

Accepted Solutions
jyothish8807
Master II
Master II

Hi Takafumi,

Try this:

Load *,

if(Previous(Val)=0 and Val<>0,AutoNumber(Val)) as New;

LOAD * INLINE [

    Prod, Val

    A, 2

    B, 0

    C, 2

    D, 2

    E, 0

    F, 3

    G, 3

    H, 0

];

123.JPG

Br,

KC

Best Regards,
KC

View solution in original post

9 Replies
Anil_Babu_Samineni

Will you share sample application to get those?

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
jyothish8807
Master II
Master II

Hi Takafumi,

Try this:

Load *,

if(Previous(Val)=0 and Val<>0,AutoNumber(Val)) as New;

LOAD * INLINE [

    Prod, Val

    A, 2

    B, 0

    C, 2

    D, 2

    E, 0

    F, 3

    G, 3

    H, 0

];

123.JPG

Br,

KC

Best Regards,
KC
Anonymous
Not applicable
Author

Hi Jyothish.

Thank you.

I was able to create the graph of purpose.

After that, I will make it with my own data.

Anonymous
Not applicable
Author

thanks.

I could do it in the way below.

jyothish8807
Master II
Master II

You are welcome

Best Regards,
KC
Anonymous
Not applicable
Author

I have another question.

What about the data in the csv file?

jyothish8807
Master II
Master II

Try this now

Best Regards,
KC
Anonymous
Not applicable
Author

Thank you.

But what I want to make is to read arbitrary CSV files and count the edges of the graph.

jyothish8807
Master II
Master II

You can replace the inline table with your load script. The logic will remain the same.

Br,

KC

Best Regards,
KC