Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Emil_bros
Contributor III
Contributor III

dynamic variable in expression

Hi,

I have following datamodel loaded:

"

load
GPSI_Version,
GPSI_Month,
GPSI_Constrained_Q,
ApplyMap('Map_Accuracy',GPSI_Version, null()) as Official_PSI

FROM
[$(QVDDir)GPSI*.qvd]
(qvd)
;

"

I need to get this result into one line (without Official_PSI dimention😞

as_is.JPG

I am trying following expression but it returnes 0.

sum(if(GPSI_Month = Official_PSI, GPSI_Inventory_WH_Q))

to_be.JPG

 

Any ideas where am I wrong?

Emil

 

1 Solution

Accepted Solutions
sunny_talwar

Is this your expression?

image.png

or this?

sum(if(GPSI_Month = Official_PSI, GPSI_Inventory_WH_Q))

The first one would not work... but the second one should work... if it doesn't would you be able to share a sample where we can see the issue? 

View solution in original post

6 Replies
sunny_talwar

Removing Official_PSI dimension should do it for you, wouldn't it?

Emil_bros
Contributor III
Contributor III
Author

that is my goal but I only get empty table when removing Official_Psi dimention

Capture.JPG

sunny_talwar

Is this your expression?

image.png

or this?

sum(if(GPSI_Month = Official_PSI, GPSI_Inventory_WH_Q))

The first one would not work... but the second one should work... if it doesn't would you be able to share a sample where we can see the issue? 

Emil_bros
Contributor III
Contributor III
Author

I am  using :

sum(if(GPSI_Month = Official_PSI, GPSI_Inventory_WH_Q))

also surprised it's not working.

I'll try to prepare sample but actual report is quite complex (90 MB) so no that easy to extract just this case.

 

sunny_talwar

Difficult to say without looking at this.

Emil_bros
Contributor III
Contributor III
Author

problem solved. Dimentions weren't formatted as date.

Thank you for the help.