Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
AndrewR
Contributor
Contributor

Straight Table grouping data

I Need a Straight table to display like this.

Product_Name Yr_2023 Yr_2024    
sticks 500 700 <--- sales
bats 200 150    

 

I have the data in Excel and loaded in successfully.  I just need to get total sales for 2023 Vs total sales for 2024.  How do I group the data in a Straight table to show this?  Any help would be great.

Labels (1)
1 Solution

Accepted Solutions
qv_testing
Specialist II
Specialist II

try this

product name as the dimension and below two are expressions

Current Year 2024: SUM({<Year={'$(=Max(Year))'}>}Sales)

Previous Year 2023: SUM({<Year={'$(=Max(Year)-1)'}>}Sales)

View solution in original post

2 Replies
Or
MVP
MVP

You would have product name as the dimension, and two measures - one along the lines of Sum({< Year = {2023} >} Sales) and the other the same for 2024. If you wanted the difference, you'd subtract one from the other.

qv_testing
Specialist II
Specialist II

try this

product name as the dimension and below two are expressions

Current Year 2024: SUM({<Year={'$(=Max(Year))'}>}Sales)

Previous Year 2023: SUM({<Year={'$(=Max(Year)-1)'}>}Sales)