Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
mhmmd_srf
Creator II
Creator II

Not Getting Fixed Value

Hi All,

I have an expression like:

Count({$<[Month_Year_Opened]={'2016-Sep'}>} distinct Req_number)

I want to make it fixed for 2016-Sep always. Even if I select any value from Month_Year_Opened filter. But this is not happening.

If I select any other value from filter like June-2016, the expression is showing 0. Hard coding is also not working. Any way to fix this?

Thanks,

Sarif

1 Solution

Accepted Solutions
vinieme12
Champion III
Champion III

Try

Count({$<[Month_Year_Opened],[Month_Year_Opened]={'2016-Sep'}>} distinct Req_number)

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.

View solution in original post

8 Replies
tresesco
MVP
MVP

You have to ensure that the date format of your field matches in the set expression. I.e. - if the field  [Month_Year_Opened] has data in YYYY-MMM format or MMM-YYYY. Whichever is correct, you have to pass the value in the set expression exactly in similar format. If you have any other date field and you wish to select a date from there, you have to bypass it's filter in the set expression as well like:

Count({$<OtherDate1, OtherDate2, [Month_Year_Opened]={'Sep-2016'}>} distinct Req_number)

mhmmd_srf
Creator II
Creator II
Author

Format is same. That is why default is showing. But when I am selecting any value from Month_Year_Opened filter then it is showing 0

Thanks,

Sarif

tresesco
MVP
MVP

Could you post a sample qvw that demonstrates the issue?

vinieme12
Champion III
Champion III

Try

Count({$<[Month_Year_Opened],[Month_Year_Opened]={'2016-Sep'}>} distinct Req_number)

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
tresesco
MVP
MVP

This is actually equivalent to: Count({$<[Month_Year_Opened]={'2016-Sep'}>} distinct Req_number) . I am not really sure if putting the same field twice in set could help in this case.

sunny_talwar

I agree with tresesco‌. I don't think putting the field name twice in the set analysis would or should make any difference. I would love to see an example where this isn't the case. Would you be able to provide one mhmmd_srf‌?

vinieme12
Champion III
Champion III

Yep I know, but it seems there is something wrong with his data model

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
vinieme12
Champion III
Champion III

Just a thought, would a  keyfield cause such problem?  I haven't come across a situation like this before

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.