Table of Contents

Class TimeUnitColumnAssociation

Inheritance
TimeUnitColumnAssociation
Implements
Inherited Members
Namespace
TabularEditor.TOMWrapper
Assembly
TOMWrapper.dll

Represents a group of columns that are associated with a specific time-unit.

public sealed class TimeUnitColumnAssociation : CalendarColumnGroup, ICustomTypeDescriptor, ITabularObject, INotifyPropertyChanged, IHandlerObject, INotifyPropertyChanging
Extension Methods

Remarks

This metadata object is only supported when the compatibility level of the database is at 1701 or above.

Properties

AssociatedColumns

A collection of columns that should be grouped together with this column when used in visuals (RelatedColumnDetails).

public AssociatedColumnCollection AssociatedColumns { get; }

Property Value

Type Description
AssociatedColumnCollection

Parent

The parent Calendar of the current Time Unit Column Association.

public Calendar Parent { get; }

Property Value

Type Description
Calendar

PrimaryColumn

Gets or sets the reference to the primary column in the association.

[TypeConverter(typeof(TableColumnConverter))]
public Column PrimaryColumn { get; set; }

Property Value

Type Description
Column

The Column instance that is the primary column, or a null reference (Nothing in Visual Basic) if such column is not set.

TimeUnit

The TimeUnit used in the association.

public TimeUnit TimeUnit { get; set; }

Property Value

Type Description
TimeUnit

Methods

CreateNew(Calendar, TimeUnit)

Creates a new instance of the TimeUnitColumnAssociation class and associates it with the specified calendar.

public static TimeUnitColumnAssociation CreateNew(Calendar parent, TimeUnit timeUnit)

Parameters

Type Name Description
Calendar parent

The Calendar to which the new TimeUnitColumnAssociation will be added. Cannot be null.

TimeUnit timeUnit

The time unit to associate with the new column.

Returns

Type Description
TimeUnitColumnAssociation

A new TimeUnitColumnAssociation instance associated with the specified calendar.

Remarks

This method creates a new TimeUnitColumnAssociation object, initializes it, and adds it to the CalendarColumnGroups collection of the specified parent.

ToString()

Returns a string representation of the object, including the primary column name and time unit.

public override string ToString()

Returns

Type Description
string

A string that represents the object. The format is either "(Unassigned)" if the primary column is null, or "PrimaryColumn.DaxObjectName (TimeUnit)" with the time unit formatted.

Remarks

If the PrimaryColumn is null, the method returns "(Unassigned)". Otherwise, it returns the DaxObjectName followed by the time unit, formatted with camel case splitting.