Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Aag
Contributor III
Contributor III

Question on dates

Hello all, 

I have a KPI dashboard that I have used set analysis for all the KPI measures to default to max year when it is opened by default. The dashboard also has a Date picker range where user can select the from and todates and the KPI's can dynamically change based on the period selected. 

I am having a text displaying in the dashboard that says "Data is from datefrom thru dateto" 

I have set datefrom dimension as  yearstart(max(Datefield))

                    dateto : date(max(datefield),'MM/DD/YYYY')

Both the above are in format MM/DD/YY. This is perfectly working fine when the dashboard is first opened as all the KPIs are of the current year.. 

Question is - When I user changes the dates thru datepicker, the fromdate should change based on what user selects.. 

Is there a way we can say .. If nothing is selected, show fromdate as yearstart(max(Datefield))  but if datepicker from date is selected, then show that date?

Can someone help how to write this calc? Appreciate your help

 

 

 

Labels (1)
1 Reply
Anil_Babu_Samineni

Perhaps this

If(GetSelectedCount(DateField)>0, Max(Datefield), yearstart(max(Datefield)))

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful