Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Calculated dimension

Hi Experts,

i want to display on current month's date in my dimension.

i have a variable set as vMTD = '>=' & Date(MonthStart(Today()-1)) & '<=' & Date(Today()-1)

How can i create a dimension in my straight table. Please help.

1 Solution

Accepted Solutions
sunny_talwar

I don't really understand if you want set analysis or calculated dimension, but I guess here are both options

1) Calculated dimension (Remember to select 'Suppress When Value Is Null')

If(DateField >= MonthStart(Today()) and DateField < Today(), DateField)

2) Set Analysis

Sum({<DateField = {"$(='>=' & Date(MonthStart(Today()), 'DateFieldFormatHere') & '<' & Date(Today(), 'DateFieldFormatHere'))"}>} Measure)

View solution in original post

4 Replies
sunny_talwar

This variable looks more like a candidate for set analysis. Do you specifically wanted to use calculated dimension for current month?

Not applicable
Author

Yes sunny please

I want only current month's dates in the chart excluding today.

Please help

sunny_talwar

I don't really understand if you want set analysis or calculated dimension, but I guess here are both options

1) Calculated dimension (Remember to select 'Suppress When Value Is Null')

If(DateField >= MonthStart(Today()) and DateField < Today(), DateField)

2) Set Analysis

Sum({<DateField = {"$(='>=' & Date(MonthStart(Today()), 'DateFieldFormatHere') & '<' & Date(Today(), 'DateFieldFormatHere'))"}>} Measure)

Not applicable
Author

Thank u so much sunny