Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
WernerDC
Creator
Creator

Measures vs Expressions

Hi,

We are migrating from View to Sense and have some issues.

This issue popped up today:

I have calculating Expressions in Qlikview but they dont seem to work as a Calculating Measure in Sense?

 

See here:

Definition of Expression in Qlikview(It works perfectly)

=

// a
If( ( Sum([HARVESTDECLARATIONSPERHARVESTSTATUS COUNT PER FARMVAR])=1 and [HD HARVEST STATUS]='NO' ) , Sum([ACTUALEXPORTEDDIPARPERVAR CARTONS])*Sum(HA) /Sum( [CITRUSBUDGETPERVAR HA] ) ,

// c
If( ( Sum([HARVESTDECLARATIONSPERHARVESTSTATUS COUNT PER FARMVAR])=1 and [HD HARVEST STATUS]='YES' ) , Sum([ACTUALEXPORTEDDIPARPERVAR CARTONS])*Sum([HD TOTAL HARVEST])/Sum([HARVESTDECLARATIONSPERVAR TONNES] ) ,


// b
( Sum( {<[HD HARVEST STATUS]={'YES'}>} [HD TOTAL HARVEST CARTONS]) )

+

(

( Sum([ACTUALEXPORTEDDIPARPERVAR CARTONS]) - Sum([HARVESTDECLARATIONSPERVARSTATUS CARTONS]) )
*
( ( Sum( {<[HD HARVEST STATUS]={'NO'}>} [Werklike ha Produksie]) ) / ( ( Sum([HARVESTDECLARATIONSPERVAR HECTARES]) - Sum([HARVESTDECLARATIONSPERVARSTATUS HECTARES]) ) ) )

)

 

))

 

 

This however does not work as a measure in Sense.

 

Please advise

3 Replies
JordyWegman
Partner - Master
Partner - Master

Hi Werner,

The function seems to be good, although you have some '( )' that could be removed and would make it easier to read also. 

  1. Are you sure you have all the fields?
  2. Sure you  made a measure and not a calculated dimension?

Jordy

Climber

Work smarter, not harder
WernerDC
Creator
Creator
Author

Hi,

I do have everything in order as you mentioned.

Even at the bottom of the Expression it says Expression is OK.

 

So I don't know why it is not working.

 

Thank you for your reply

 

Vegar
MVP
MVP

Are you 100 that the data model is identical? Could it be issues in the script causing the difference?

What happens if you put this expression into a new Qlik Sense application that performs a binary load of the original QlikView file. This approach will rule out if there is differences in the data.