
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
SET ANALYSIS with 3 conditions
Hello, I am trying the represent data in a barchart like this, If the user does not select any date, show the yesterday data.
If he selects a date or a range of dates show the data in that specific range.
I am using the following the setanalysis:
=IF(GetSelectedCount(DateAll)>0, AVG({<delta= {">-25<8"},[table2.mach_group]={"BCA"}>} delta),
AVG({$<DateAll={'$(YESTERDAY)'},delta= {">-25<8"},[table2.mach_group]={"BCA"}>} delta))
I am using the same logic for other representation and it works(but with only 2 set analysis). Can someone tell me if I am integrating the 3 conditions correct in the formula?
I tested the date format using the bellow formula and it works. So the date fromat should be correct
=IF(GetSelectedCount(DateAll)>0, 1, 2)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can perform 3rd condition like
=IF(GetSelectedCount(DateAll)>0, AVG({<delta= {">-25<8"},[table2.mach_group]={"BCA"}>} delta),
If(GetSelectedCount(DateAll)>0, <Your third condition>, AVG({$<DateAll={'$(YESTERDAY)'},delta= {">-25<8"},[table2.mach_group]={"BCA"}>} delta)))


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi CostinelRO,
May be the issue is with your $(YESTERDAY) variable. Try this once
Define variable like this:
YESTERDAY = date(max({1} DateAll)-1,'Yourdateformat') //make sure to add a "=" in the variable definition, also i believe you have data available for the yesterday 🙂
KC
