Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Qlik® Product Spotlight: Discover what’s possible. Get more from our products.
See for yourself. Register today.
hlines_usacs
Not applicable

Dimension Help - Actual and Forecast

Hello, I am trying to figure out an expression for a dimension for a table.

This is my table and the current expression for the Adjusted Encounters dimension

table dimension.jpg

IF([Service Date] <= Today()

  , 'Actual through ' & date(today(),'MM/DD')

  ,'Forecast through ' & date(floor(monthend(Today())), 'MM/DD')

)

I want the Actual numbers to be everything up to and including 03/22/17, and the Forecast to be everything up to and including 03/31/17. Right now it is putting the counts into one or the other. For example, the Actual for Forecast should be 4,620,281, instead of the 1,936,560. Is it best to try to do that in the dimension, or in the expression of the measures?

6 Replies
OmarBenSalem
Not applicable

Re: Dimension Help - Actual and Forecast

You should do that in the measure;

What is the measure you're using?

kkkumar82
Not applicable

Re: Dimension Help - Actual and Forecast

is this the values showing in the table dynamic , I mean this should vary by selections

hlines_usacs
Not applicable

Re: Dimension Help - Actual and Forecast

The expression for Actual is SUM({<[Fact Type]={'P-VP Daily AGG'}>}[Flash Encounters MTD])

and the expression for Budget is SUM({<[Fact Type]={'P-VP Daily AGG'}>}[Budget Encounters MTD]).

OmarBenSalem
Not applicable

Re: Dimension Help - Actual and Forecast

Can you please attach a test application containing this table so I can work on?

I think I can do it.

Thanks,

Omar,

OmarBenSalem
Not applicable

Re: Dimension Help - Actual and Forecast

Try  rangesum(above( SUM({<[Fact Type]={'P-VP Daily AGG'}>}[Flash Encounters MTD]),0,rowno())

sunny_talwar
Not applicable

Re: Dimension Help - Actual and Forecast

Try this:

If([Service Date] <= Today(), Sum({<[Fact Type]={'P-VP Daily AGG'}>} [Flash Encounters MTD]), Sum(TOTAL {<[Fact Type]={'P-VP Daily AGG'}>} [Flash Encounters MTD]))