Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hello
I have a requirement where i need to display only the first 10 rows on a qliksense table.
i tried with Fixed Number (top 10) but as it based on a measure; If the multiple dimensions have same value. the number of rows become more than 10.
Want to add... this table is to be used in an nprinting html report where they want only 10 rows.
in qlikview we had 'Max Number' in presentation tab. Is there an equivalent here?
screenshot below to give an idea
Hi @Anonymous, maybe you can try with RowNo() function. For example:
If(RowNo(TOTAL) <= 10, Sum([Sales Amount]))
And disabling the "Include zero values" option.
JG
I tried that, unfortunately doesnt work. the number and sorting all gets messed up.
see below screenshot and compare to one before in my original post. you can see that 'Order Count' = 1s have disappeared because the order gets messed up. Same result if i put a measure rowno(total) and try to get top 10 from there.
@JuanGerardo may be below
1) Create composite key for dimensions used in table. Based on screenshot I have assumed there are two dimension. You can create Key accordingly if there are others dimensions
LOAD *,
autonumberhash256( CategoryName&CustomerCountry) as Key
FROM table;
2) Use below measure in your table
=if (aggr( RowNo(total), (Key,(=sum(Sales),ASCENDING)))<=10 ,sum(Sales))
Replace sum(Sales) with your actual expression
3) Go to Add-ons , uncheck Include zero values option
4) Go to Sorting, promote measure to top with Numeric ascending option
HI Kushal
the actual scenario is much more complicated. the screenshot is from just a sample app.
actual app has around 10 dimensions.
If there is no simple way to do that seems to be a big feature gap in sense
If you have 10 dimensions then you need to create composite key using 10 dimension in script and use it in expression as I mentioned.
unfortunately i cant create that kind of composite; that wont work as its not a flat data model it s star schema and the columns are in different tables.
@Anonymous If you are using star schema then also you can do it with IDs in Fact table. Your dimension tables might be linked to Fact table with Ids within Fact table. So you can make composite key using IDs. For eg. category name ID, Country ID, etc.