Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, I wanna sort the columns based on values( example: sales by city), how to do it using .net SDK
There is a project available on branch that illustrates how to use hypercubes:
In particular, check out this method that illustrates how to configure sorting of a hypercube:
Hi, thank you for your response, But I'm still lagging with that, can I have code samples for sorting the value in column(eg: salary of the employee, I wanna sort their salaries in descending order)
What are you lagging with? Hypercubes? If that is the case, then now is the time to read up on it . Hypercubes are what we use for doing that type of operations in Qlik Sense. If you have a hypercube that contains "City" as dimension and "Sum(Sales)" as measure, and want to sort the rows by the sales (descending), then you need to configure your hypercube like this:
// Configure measure to sort descending:
hyperCube.Measures.First().SortBy = new SortCriteria {SortByNumeric = SortDirection.Descending};
// Configure cube to sort on measure first:
hyperCube.InterColumnSortOrder = new[] { 1, 0 };
This is a nice example to add to the hypercube example though, so I just did that. You can find the example here: