Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

no data replace 0


if there is no data end set the value to zero.I need the hellp pn this for a calculation.

if net balance dnt ave data then we should get 0 so tha in comupaion of

balance-net balance we get, blance-0=balance

Regards,

Prajna

22 Replies
anbu1984
Master III
Master III

Can you explain with your data?

Not applicable
Author

Hi,

Actually i have creaed a master date field.. i have a table wih few dates and balance netbalance

onemore table with balance.

so i need to subtract net balance from balance for all date fields.

but there are few data or net balnce.

ex

Id          date          netbalance

1          13 apr            48

2          14 apr                 79

3        17 apr                 90

Balance:

id  balance

1     400

2     500\

3     788

so now i need to subtract netbalance from balance

id   date         total

1     13 apr     400-48

1     14 apr     400-79

1     15apr     400-0

1     16apr     400-0

1     17apr     400-90

canu help me out..

Regards,

Prajna

anbu1984
Master III
Master III

Can you explain your logic? Do you want to create rows with missing dates? Do you want to join with only id 1 in balance table or all ids like below?

id   date         total

1     13 apr     400-48

1     14 apr     400-79

1     15apr     400-0

1     16apr     400-0

1     17apr     400-90

2     13 apr     500-48

2     14 apr     500-79

2     15apr     500-0

2     16apr     500-0

2     17apr     500-90

3 .....

Not applicable
Author

for all id's for all dates.. JAN-DEC  if i dnt have records for netbalance then it will 0 so when i subtract balance wih net balance and f i dnt jave value for netbalance then it will be set to 0and

i will get balance.

Not applicable
Author

Hi Prajna,

First you have to Join Calander table with ex table so that you get all dates in ex:. Once you get all dates you can use it with balance table.

Kindly tell if this helped ?

Thanks & Regards

Suhas Gupta

MK_QSL
MVP
MVP

Can you provide little more data... Say for three ID and 12 Months for all ID

Not applicable
Author

its already link.. the prob is i get only related data if data is not there for date field then i should get 0

so that i should have data

Regards,

Prajna

Not applicable
Author

Hi,

My requirement is i have few transactions posted for few dates.but i need to show for all dates so i used master date

linking to the transaction date.

I have to do calculation

subtract transaction net amount with balnce amount

balacne amt is from other table

transaction n dbalance tanle is linked with id.

if there is no transaction data for particular date then i need to get 0.

Regards,

Prajna

MK_QSL
MVP
MVP

Understood your point of view, but above sample data file is showing cross join which is looking of no logic.

If you can provide some proper sample data, will definitely work out.