Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I need some help to understand if what I try to achieve is possible or not and your help is much obliged.
I have to date fields table1.dateA and table2.dateB and one field to count (in the fact table)
COUNT({<monthstart(dateA)= {(=MonthStart(dateB))} >} DISTINCT field_to_count)
Is it possible to only DISTINCT COUNT where MonthStart(table1.dateA) = MonthStart(table2.dateB)?
If yes would you be so kind and advice on the syntax?
Thank you
May be this:
Count({<field_to_count = {"=monthstart(dateA) = MonthStart(dateB)"}>} DISTINCT field_to_count)
Thank you for the suggestion but this did not work.. I'm stil trying..
Would you be able to share a sample where this isn't working?
What are your date formats for your dateA and dateB?
Hi
My dateA format is 2015-10-01 00:00:00
I try to simplify to see if this is possible but Im not able to make this work either:
count({$<dateA={date#('2015-10-01','YYYY-MM-DD')}>} DISTINCT field to count)
I try to filter out only the rows where dateA = 01OCT2015 using a set expression.
Maybe Im trying to do something that cant be done?
I came across this:
Limitation: take care, a set analysis is calculated once per chart (or table). NOT once per row. If you
want a different result in your set analysis according to the row being calculated and displayed, it will NOT
work. Change the way to compute your data (model, if statement) but forget the set analysis.
Is your Field to count is actual field name here? Try this? Using sunny's expression
count({$< fieldtocount ={ "= MonthStart(Date(date#(dateA,'YYYY-MM-DD hh:mm:ss') 'YYYY-MM-DD')) = MonthStart(Date(date#(dateB,'YYYY-MM-DD hh:mm:ss') 'YYYY-MM-DD')) " }>} DISTINCT field to count)