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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Tagging dimension table from fact table

Hey,

 

I have a standard one-to-many relationship between a dimension and a fact table.

 

I need to create calculated column for the dimension table where values are based on whether said dimension appears in a fact table.

 

I would only need 1 or 0 for each row on dimension table, but I can't seem to figure this one out.

 

edited for clarification.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

I managed to get the result I was looking for with this.

 

= IF ( ISBLANK ( CALCULATE ( COUNTROWS ( VALUES ( Fact) ) ) ) ; 0 ; 1 )

View solution in original post

3 REPLIES 3
vanessafvg
Super User
Super User

@Anonymous are you looking for a column or value?





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




Anonymous
Not applicable

@vanessafvg I'm looking for a value.

 

One calculated column for dimension table and in that column values 0 or 1 based on the fact table.

Anonymous
Not applicable

I managed to get the result I was looking for with this.

 

= IF ( ISBLANK ( CALCULATE ( COUNTROWS ( VALUES ( Fact) ) ) ) ; 0 ; 1 )

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.