Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anil_Babu_Samineni

Straight Table Issue

Hello,

I have table like below

LOAD * INLINE [

    Country, Sales

  India,  5000

  Us, 2500

  Uk, 4000

  India, 5000

  Us, 5500

  India, 4500

];

So, Now i want to show Straight table like below

CountrySales
India5000
India5000

Note: Please send me the Expression using Set Analysis ....

Please help me, I Appreciate your Help ..

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
1 Solution

Accepted Solutions
tamilarasu
Champion
Champion

ANil,

Check the attachment.

View solution in original post

11 Replies
tamilarasu
Champion
Champion

Use RecNo() function in your load script. Add the Recno column in straight table and go to presentation tab then hide it. Check the attachment for better understanding.

Load *, RecNo() as RecNo;

LOAD * INLINE [

    Country, Sales

  India,  5000

  Us, 2500

  Uk, 4000

  India, 5000

  Us, 5500

  India, 4500

];

Anil_Babu_Samineni
Author

Tamil,

Thanks for Attempting..

I want to show o/p like below, Please review my required O/P

Country          Sales

India              5000

India              5000

Here, I don't want to show 4500 Data....

Updated : My Client allowed to show Duplicates as well ....

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
Anonymous
Not applicable

Hi Anil,

I guess Country is the dimension. You can make it calculated dimension similar to

If(Country = 'India', Country)

Good Luck

Anonymous
Not applicable

Oh, I forgot the 4500 row ... then the Expression for Sales might be if(Sales > 4500, Sales) ...

... or probably Sum({<Sales = {'>4500'}>} Sales)

tankut_kocabas
Partner - Contributor II
Partner - Contributor II

Hi,

You can try this

Temp:
LOAD * INLINE [
Country, Sales
India, 5000
Us, 2500
Uk, 4000
India, 5000
Us, 5500
India, 4500
]
;

Temp1:
NoConcatenate LOAD Country, Sales
Resident Temp
WHERE Country = 'India';

DROP Table Temp;

tamilarasu
Champion
Champion

ANil,

Check the attachment.

HirisH_V7
Master
Master

Hi,

May be these ways,

  1. Dimension:

      =IF(Match(Country,'India'),Country)

      Expression:

        =IF(Sales<>'4500',Sum(Sales))

    2.

    Only expression:

Sum({<Country={'India'},Sales-={'4500'}>}Sales)

Straight Table -Rec no-218582.PNG

Can You please elaborate your requirement do you require the values above 5000 for india or what you can specify that condition in the expression itself or in script itself you can handle it using where condition.

Hope this Helps,

PFA,

Hirish

HirisH
“Aspire to Inspire before we Expire!”
Anil_Babu_Samineni
Author

Tamil,

Perfect..

Sometimes, Client need only India data.

Note: They can allow Duplicates as well.

My task is finished. Do favor for me..

I want to show like this

Country            Sales

India                 5000

India                 5000

India                 4500

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
Not applicable

Hi,

See the attached.