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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

TREATAS in calculated column

 I have a new fact table FactAnalysis that I want to find Logged time values to by IssueID and WorkType.

 

The data is comming from FactLog (has IssueID, Logged time and Work Type) which is connected to DimIssue. 

The following simple formula does not seem to work

 

CALCULATE(

SUM(Factlog[LoggedTime]);

TREATAS(VALUES(FactAnalysis[IssueID]);DimIssue[IssueID]);

TREATAS(VALUES(FactAnalysis[WorkType]);FactLog[WorkType])
)

 

The formula gives same result for all Issue and Type combinations.

Any help is much appreciated.

 

 

1 ACCEPTED SOLUTION
v-yuta-msft
Community Support
Community Support

@Anonymous ,

 

This issue should be related to the data model. Could you please share sample data and show the data structure/relationship of your data model?

 

Regards,

Jimmy Tao

View solution in original post

2 REPLIES 2
v-yuta-msft
Community Support
Community Support

@Anonymous ,

 

This issue should be related to the data model. Could you please share sample data and show the data structure/relationship of your data model?

 

Regards,

Jimmy Tao

Anonymous
Not applicable

Thank you for the response and for bringing forward the potential problem. The model is indeed a complicated one (10+ tables), unfortunately I cannot share it here. I think the solution here will be simplifying the model first.

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.