Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Straight table expression not working?


HI,

I have to write a expression based on below condition

IF Status='Open' then NUM(DataColumn1-DataColumn2)

I am trying to use if(Status=Open', NUM(DataColumn1-DataColumn2)). But straight table column is showing blank. table is not loading any data. Is there any error in expression? please can anyone suggest me

Thanks.

24 Replies
rajeshforqlikvi
Creator
Creator

Hi try like this

if(Status= 'Open' ,DataColumn1 ) - if(Status = 'Open', DataColumn2)

ramasaisaksoft

Hi Amelia,

I have a small doubt can u please check

Status='open' here i am expecting (small) o or is it O

if data is there then check first like =if(Status='Open',4-2) [now u got all values are 2 else your data is wrong].

after that u can check like below

=if(Status='Open',num(DataColumn1)-num(DataColumn2))

Not applicable
Author

Thanks. Values are showing corresponding to Data1, Data2, Data3 as below.

                                                                                                                                                                                                                                                        

WeekCustomerIDData1Data2Data3
15254 18.0
1908 17
1434 48
11434 30.5
145 20.9
1434 29.3
13543 42.4
17676 30.7
167657 102
1674 99
2907852
2565 102
2575763
36767107
37845765 100
3856854
36856 14.5
35756 17.2
385679
37856 34.9
 
468 106
41280
1865 91
1787108
1658680
185
1756878
165856106
2785680
244634 82
2897 84
28657 75
2686 93
245
234 98

is there any way to change the above table with out blanks and to keep only values. I am thinking whether is it possible or not because of different CustomerID. Please suggest me

jagan
Luminary Alumni
Luminary Alumni

HI,

It is not possible, because you have different customers in each row, if you remove the Customer dimension then you get the expected result but I think you definitely need it.

Regards,

Jagan.

Not applicable
Author

Thanks.