Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Morgoz
Contributor III
Contributor III

Use dimension value in measure

Hello,

I'd like to know if is it possible to use the "current" value of a dimension in a measure.

For example, if I have a table like this:

CONTRACT:
LOAD Contract_number,
Contract_creation_date,
Execution_date

Then, I want to create a bar-graph to show, for each execution_date, the count of contracts created in that date, which would be something like:

DIMENSION: Execution_date

MEASURE: Count({Contract_created_date = {Execution_date}} Contract_number)

But that doesn't work.

Thank you!

Labels (1)
1 Reply
TusharCC
Partner - Contributor II
Partner - Contributor II

The Aggr Function -- AGGR(count(Contract_number),Contract_created_date, Execution_date)

You can test with the following data assuming your dataset looks something like this:

Table:

Load * Inline [
Contract_number,Contract_creation_date,Execution_date
A, 01/03/2021,02/03/2021
B, 11/04/2021,11/04/2021
C, 03/05/2021,29/06/2021
D, 31/05/2011,31/05/2011
];