Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Announcements
QlikWorld, June 24-25, 2020. Free virtual event for DI and DA gurus. Register Today
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor II
Contributor II

Expression independent from dimension

I want to form a chart/table where I can view my cost values. And in addition I want to add a column where I can view cost/revenue. SO since my Cost is filtered in my measure (measureID, by selection, I need to make revenue independent from that filter, while it still obeys date,etc.

easureID, date, value

cost1, 1/1/2017, 10

cost2, 1/1/2017, 33

cost3, 1/1/2017, 23

revenenue, 1/1/2017, 100

...

I've tried the following. But it seems to be stilled overruled by my measureID selection.

sum(value) / Sum({<[measureID]={'revenue'}>} value)

4 Replies
Highlighted

Re: Expression independent from dimention

Try this

Sum(value)/Sum(TOTAL {<[measureID]={'revenue'}>} value)

Highlighted
Contributor II
Contributor II

Re: Expression independent from dimension

thanks stalwar1‌ .   but TOTAL didn't work.  I discovered that the following expression gets me closer (i.e. Sum(value)/Sum(1{<[measureID]={'revenue'}>} value) )

However, that also doesnt work  becasue it makes my expression indepent of everyhing (year, brand,etc.)

Highlighted

Re: Expression independent from dimension

You mean this

Sum(value)/Sum({1<[measureID]={'revenue'}>} value)

What is the output you are looking to get?

Highlighted

Re: Expression independent from dimension