Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
eduardo_dimperio
Specialist II
Specialist II

Set Analysis - Comparing two dates

Hi,

I'm trying compare two fields and count all meters from same date, but this didnt work:

count({<MES_ANO_EXTRACAO={MES_ANO_VAZAMENTO}>} DISTINCT OID_METER)

Any help please?

1 Solution

Accepted Solutions
sunny_talwar

Does MES_ANO_EXTRACAO and MES_ANO_VAZAMENTO reside in the same table or different tables? If they are in different tables, then you might need to use an if statement

Count(DISTINCT If(MES_ANO_EXTRACAO = MES_ANO_VAZAMENTO, OID_METER))

View solution in original post

4 Replies
sunny_talwar

Try this

Count({<OID_METER = {"=MES_ANO_EXTRACAO = MES_ANO_VAZAMENTO"}>} DISTINCT OID_METER)

eduardo_dimperio
Specialist II
Specialist II
Author

Hi Sunny, not working too.

This is what a have, i did a simple if just to check if they are equal in the right places

If(MES_ANO_EXTRACAO=MES_ANO_VAZAMENTO,'EQUAL','DIFFERENT')

set_analysis.JPG

And this with Set Analysis

set_analysis2.JPG

sunny_talwar

Does MES_ANO_EXTRACAO and MES_ANO_VAZAMENTO reside in the same table or different tables? If they are in different tables, then you might need to use an if statement

Count(DISTINCT If(MES_ANO_EXTRACAO = MES_ANO_VAZAMENTO, OID_METER))

eduardo_dimperio
Specialist II
Specialist II
Author

Ahhhh didnt know about that, it works, thank you like always Sunny