Forum Discussion
measures aggregated on different dimensions
- 8 years ago
Hi lolojee
You can do this using a calendar table which has an active relationship with one of your date columns and an inactive relationship with the other one.
You should set up your data model like this:
And write measures like this:
measure1 = SUM ( Sales[quantity] ) measure2 = CALCULATE ( SUM ( Sales[price] ), USERELATIONSHIP ( Sales[dateout], 'Calendar'[Date] ) )In this example, the inactive relationship is with the dateout column, so measure2 uses USERELATIONSHIP to active the inactive relationship.
Regards,
Owen
Hi lolojee
You can do this using a calendar table which has an active relationship with one of your date columns and an inactive relationship with the other one.
You should set up your data model like this:
And write measures like this:
measure1 =
SUM ( Sales[quantity] )
measure2 =
CALCULATE (
SUM ( Sales[price] ),
USERELATIONSHIP ( Sales[dateout], 'Calendar'[Date] )
)In this example, the inactive relationship is with the dateout column, so measure2 uses USERELATIONSHIP to active the inactive relationship.
Regards,
Owen