Skip to main content
Announcements
See why Qlik is a Leader in the 2024 Gartner® Magic Quadrant™ for Analytics & BI Platforms. Download Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anil_Babu_Samineni

Pivot Label Calculation Problem

Hello,

I've created one variable like

vCurrMonth = Max(Month(Today())-2)

And i've create object. I want to show Label like Actual(Jul) --

In future, we change the variable like =Max(Month(Today())-1) -- I want label like Actual(Aug) -- Like that

I've attempt this

='Actual' & chr(32) & '(' & Date#(Max(Month(Today())-2),'MMM') & ')'

It is giving Actual(7) -- I want Actual (Jul)

Can anyone assist me?

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
1 Solution

Accepted Solutions
settu_periasamy
Master III
Master III

Ok. then try like this..

='Actual' & chr(32) & '(' & Date(Date#($(vCurrentMonth),'M'),'MMM') & ')'

View solution in original post

5 Replies
settu_periasamy
Master III
Master III

Have you tried this?


='Actual' & chr(32) & '(' & Date(Date#(Max(Month(Today())-2),'MMM'),'MMM') & ')'


or

='Actual' & chr(32) & '(' & Date(Max(Month(Today())-2),'MMM') & ')'

vishsaggi
Champion III
Champion III

Did you try this:

vCurrentMonth = Max(MonthName(Today())-2)

='Actual' & chr(32) & '(' & Month(Max(MonthName(Today())-2)) & ')'

Anil_Babu_Samineni
Author

Settu,

I've done these while i have the calculated variable,

But what i did is - I've created one static variable like vCurrMonth = 7

Expression is this.

='Actual' & chr(32) & '(' & $(vCurrentMonth) & ')'

Label showing like Actual (7) - I want to show 7 instead of Jul. Does it possible?

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
settu_periasamy
Master III
Master III

Ok. then try like this..

='Actual' & chr(32) & '(' & Date(Date#($(vCurrentMonth),'M'),'MMM') & ')'

Anil_Babu_Samineni
Author

Rocking

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