Skip to main content
Announcements
Happy New Year! Cheers to another year of collaboration, connections and success.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Get only Current Qtr data

Hi All,

Greetings for the Day!

I have on table which contains Current Quarter and same Quarter from previous year data.

I have ID, Name, Current Qtr, Prev Qtr amount. But my requirement is i need to display only Current Qtr ID's.

For Ex 2016Q1 has 1,2,3,4,5,6 and 2015Q1 has 1,2,3,4,5,6,7 and in my table i have to display only 1,2,3,4,5,6 for both Qtr's.

I am attaching sample Qvw also. Could you please help me here.

Thanks,

QV 11 User

1 Solution

Accepted Solutions
tresesco
MVP
MVP

PFA

sum({<Quarter ={'2015Q1'}, ID=P({<Quarter={'2016Q1'}>})>}Amount)

sum({<Quarter ={'2016Q1'}, ID=P({<Quarter={'2015Q1'}>})>}Amount)

Untitled.png

View solution in original post

7 Replies
tresesco
MVP
MVP

PFA

sunny_talwar

Try using this expression for previous expression:

If(sum({<Quarter ={'2016Q1'}>}Amount) > 0, sum({<Quarter ={'2015Q1'}>}Amount))


Capture.PNG

Not applicable
Author

Hi Tresesco,

Thank You Very Much for Reply!

Your solution will work for me but if I have amount as 0 in current month still i need to show that record also.

LOAD * Inline [

ID,Name,Quarter,Amount

1,A1,2015Q1,100

2,A2,2015Q1,110

3,A3,2015Q1,120

4,A4,2015Q1,130

5,A5,2015Q1,140

6,A6,2015Q1,150

7,A7,2015Q1,160

8,A8,2015Q1,20

1,A1,2016Q1,200

2,A2,2016Q1,210

3,A3,2016Q1,220

4,A4,2016Q1,230

5,A5,2016Q1,240

6,A6,2016Q1,250

8,A8,2016Q1,0

];

In this case i need to show 1,2,3,4,5,6,8 values but with your solution it's not working.

Could you please help me here.

Thanks,

QV11 User

Not applicable
Author

Hi Sunny,

Thank You Very Much for Reply!

Your solution will work for me but if I have amount as 0 in current month still i need to show that record also.

LOAD * Inline [

ID,Name,Quarter,Amount

1,A1,2015Q1,100

2,A2,2015Q1,110

3,A3,2015Q1,120

4,A4,2015Q1,130

5,A5,2015Q1,140

6,A6,2015Q1,150

7,A7,2015Q1,160

8,A8,2015Q1,20

1,A1,2016Q1,200

2,A2,2016Q1,210

3,A3,2016Q1,220

4,A4,2016Q1,230

5,A5,2016Q1,240

6,A6,2016Q1,250

8,A8,2016Q1,0

];

In this case i need to show 1,2,3,4,5,6,8 values but with your solution it's not working.

Could you please help me here.

Thanks,

QV11 User

sunny_talwar

Try this expression in that case:

If(Len(Trim(Avg({<Quarter ={'2016Q1'}>}Amount))) > 0, Sum({<Quarter ={'2015Q1'}>}Amount))

Digvijay_Singh

May be de-select 'Suppress zero values' in Presentation tab.

tresesco
MVP
MVP

PFA

sum({<Quarter ={'2015Q1'}, ID=P({<Quarter={'2016Q1'}>})>}Amount)

sum({<Quarter ={'2016Q1'}, ID=P({<Quarter={'2015Q1'}>})>}Amount)

Untitled.png