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

Can we put condition in max function

Hi

I want to apply a condition in max function.

Max({<[Fiscal Year]='FY16'>}( mid(Quarters,2)))

Ideally it should give me 4, but its not returning any value.

75 Replies
siddharthsoam
Partner - Creator II
Partner - Creator II
Author

Hi Shraddha can you modify the qvf accordingly please.

shraddha_g
Partner - Master III
Partner - Master III

PFA

siddharthsoam
Partner - Creator II
Partner - Creator II
Author

Shraddha I want the same functionality but for previous the quarter and month should be computed within the same measure. I am facing conflict in assigning multiple values for quarter and month to the monthstart field.

For previous month it is

Sum({<MonthStart = P(PreviousMonthStart),Quarter=,Quarters=,[Fiscal Year]=,OldFiscalYear=,Months=,MonthYear=>}[Service Rev])

For previous quarters its is-

Sum({<QuarterStart = p(PreviousQuarterStart),Quarter=,Quarters=,[Fiscal Year]=,OldFiscalYear=,MonthStart=>}[Service Rev])


I want to combine both the expression under the tab previous.

Thanks for coping with me . Really appreciate ur efforts.

shraddha_g
Partner - Master III
Partner - Master III

not so sure about combining both into one.

Lets call Sunny. He might help in combining these expressions

stalwar1

siddharthsoam
Partner - Creator II
Partner - Creator II
Author

can you elaborate the use of MonthStart you created , what value does it have

shraddha_g
Partner - Master III
Partner - Master III

I always prefer set analysis at Date level.if you are selecting 'Jan' and if you are having 3 years of data and you are using max(month) in Set analysis, It will always combine all 3 years of Jan data and will give result.

To specify Year you will again have to add 2nd condition of Year in set analysis.

I find it more comfortable in using dates over other parameters.

Its easier to put conditions on Date instead of these Multiple parameter conditions

sunny_talwar

shraddha.g‌ thanks for calling out my name, but this seems like a rather long discussion thread... is my help still needed here? I thought of asking this before I go through this humongous thread

shraddha_g
Partner - Master III
Partner - Master III

We need your help at point where we need to combine 2 expression where we are using those for previous quarter and previous months

Individually it works fine.

Nut now their requirement is both expression should be combined into one..

I am not able to write it in d way that after selection of any quarter or month how it will work for previous month and previous quarter in one expression only.

I am getting all wrong result.

So i thought you might help in this. Whether it is possible to do..

sunny_talwar

Would you be able to share the version of the file where the two expressions work individually?

shraddha_g
Partner - Master III
Partner - Master III

I had attached in my previous comment before mentioning your name