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

Use graph dimension in a measure formula

Hello,

I am currently trying to use a graph dimension to make condition inside a measure.

Here is some data for testing :

Machine table

MachineCategoryCreation Date
P2XQ5NSIAQtype0103/05/2013
CT4P9LIHCTtype0116/08/2013
BLJT3F32S1type0117/01/2014
LW26RJG4ANtype0129/11/2015
7CC3HFWQ5Ktype0111/01/2019
V2UFGK759Otype0109/03/2019
898JG2HJS2type0125/06/2019
46NHQOIGA9type0202/08/2013
RHYQHJS3Y4type0215/02/2019
GNA1XO9P6Stype0221/03/2019
6XYD3QXROZtype0228/03/2019
YQKQLVKNIOtype0322/04/2013
7MR5HSHK4Btype0324/01/2019
VKLH70YTPBtype0304/02/2019
DS9B1TK0ZXtype0413/12/2013
SQJW7SS8AYtype0407/04/2014
FJ5BL5DPFGtype0425/11/2015
NSDKXCJEY6type0409/09/2018
I2D0NBEETXtype0410/03/2019
A4P19TZXQ5type0426/07/2019

 

Tranz table

Date_tranz
janv-19
févr-19
mars-19

 

I need to count how many machine I already have for each categories by Date_tranz. So I need to to put the dimension Date_tranz and do a measure like this : count({<category={'type01'}>} Machine).</category={'type01'}>

Validity.png

This measure count all the machine and I want to exclude machines that have Creation Date more recent than Date_tranz, since these machines does not exist at that time.

Does anyone know if it is possible, please ?

Best regards.

Labels (2)
1 Solution

Accepted Solutions
JordyWegman
Partner - Master
Partner - Master

That is no problem, you can create another table with Date_tranz and a key to MonthYear. This way you can make your own period.

About the bar chart, check the following attach example, is this what you want?

2019-07-11 16_42_52-Inbox - jordy.wegman@climber.nl - Outlook.png

Jordy

Climber

Work smarter, not harder

View solution in original post

6 Replies
JordyWegman
Partner - Master
Partner - Master

Hi,

Can you show us your Data Model Viewer? Is there a link between Machine Table and Tranz Table?

Jordy

Climber

Work smarter, not harder
ClementByr
Contributor III
Contributor III
Author

Hello Jordy,

The data between the Machine Table and Tranz Table are not related, the Tranz table is just a table with a period of months that I have chosen.

I am trying to compare Creation Date from the Machine Table with the Date tranz to check if the Creation Date of a machine is older than the Date tranz to be sure that the machined existed at this date. I wish, if possible, to add this condition on top of the count that I have mentionned before : count({<category={'type01'}>} Machine).

Thanks,

Clément.

 

JordyWegman
Partner - Master
Partner - Master

Hi Clément,

Check the attachment for the application. I've added a column with MonthYear, your Date tranz. Resulting in:

2019-07-10 14_04_06-.png

Jordy

Climber

Work smarter, not harder
ClementByr
Contributor III
Contributor III
Author

Hello Jordy,

Thanks you but this is not the result I am looking for. I am supposed to have the dimension Date_tranz to know the quantity of machines by types during the period defined in Date_tranz. The bar chart should also be cumulative because the machine parc increase following the Creation Date.

Regards.

Clément.

JordyWegman
Partner - Master
Partner - Master

That is no problem, you can create another table with Date_tranz and a key to MonthYear. This way you can make your own period.

About the bar chart, check the following attach example, is this what you want?

2019-07-11 16_42_52-Inbox - jordy.wegman@climber.nl - Outlook.png

Jordy

Climber

Work smarter, not harder
ClementByr
Contributor III
Contributor III
Author

Hello Jordy,

Thank you Jordy, that's exactly what I wanted.

I am gonna add a filter on the Creation Date to show only the data on the period in the Date_tranz.

Best regards,

Clément