Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi,
struggling with DAX, as everytone else 😉
Imagine having a single table of activities for each artifact type ... looks like this
| Activity | ArtifactType | ArtifactId |
| ViewReport | Report | 1 |
| ViewReport | Report | 1 |
| DeleteReport | Report | 2 |
| UpdateDataset | Dataset | 1 |
| CreateDataflow | Dataflow | 1 |
and then there are 3 different tables for each artifact type
Reports:
| ReportId | ReportName |
| 1 | ReportA |
| 2 | ReportB |
| ... | ... |
Datasets
| DatasetId | DatasetName |
| 1 | DatasetA |
| ... | ... |
Dataflows:
| DaflowId | DataflowName |
| 1 | DataflowA |
| ... | ... |
All table have their relationships setup with the activity table, and are INACTIVE.
Now, what would the DAX look like for the measure that will return the related artifact's NAME in the ACTIVITY_TABLE?
e.g.:
| Activity | ArtifactType | ArtifactId | Name |
| ViewReport | Report | 1 | ReportA |
| ViewReport | Report | 1 | ReportA |
| DeleteReport | Report | 2 | ReportB |
| UpdateDataset | Dataset | 1 | DatasetA |
| CreateDataflow | Dataflow | 1 | DataflowA |
Thank you!
Solved! Go to Solution.
Hi @pacifist
Please try the following calculated column
Name =
SWITCH (
Activities[ArtifactType],
"Report",
MAXX (
FILTER ( Reports, Reports[ReportId] = Activities[ArtifactId] ),
Reports[ReportName]
),
"Dataset",
MAXX (
FILTER ( Reports, Reports[DatasetId] = Activities[ArtifactId] ),
Reports[DatasetName]
),
"Dataflow",
MAXX (
FILTER ( Reports, Reports[DataflowId] = Activities[ArtifactId] ),
Reports[DataflowName]
)
)
Hi @pacifist
Please try the following calculated column
Name =
SWITCH (
Activities[ArtifactType],
"Report",
MAXX (
FILTER ( Reports, Reports[ReportId] = Activities[ArtifactId] ),
Reports[ReportName]
),
"Dataset",
MAXX (
FILTER ( Reports, Reports[DatasetId] = Activities[ArtifactId] ),
Reports[DatasetName]
),
"Dataflow",
MAXX (
FILTER ( Reports, Reports[DataflowId] = Activities[ArtifactId] ),
Reports[DataflowName]
)
)
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 11 | |
| 10 | |
| 8 | |
| 6 | |
| 6 |
| User | Count |
|---|---|
| 25 | |
| 22 | |
| 19 | |
| 17 | |
| 10 |