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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
amtbew
Helper I
Helper I

Column based on another table

I have the two following tables, connected by Store ID.

 

Store Proposals

Store ID Proposal 
A1 $      500.00
A2 $      700.00
A3 $      350.00

 

 

Store Sales

Store IDSale IDSale Type Sale Value 
A1100In Scope $           125.00
A1101Out of Scope $           300.00
A2102Out of Scope $           125.00
A3103In Scope $           275.00
A3104Out of Scope $           250.00

 

Looking to add a column to Store Proposals table that indicates whether or not the Store ID has any In Scope sales.

 

2 ACCEPTED SOLUTIONS
Idrissshatila
Super User
Super User

Hello @amtbew ,

 

try the following

Column = CALCULATE(COUNTROWS('Store Sales'),'Store Sales'[Sale Type] = "In Scope")

Idrissshatila_0-1709152024508.png

 

 



Did I answer your question? Mark my post as a solution! Appreciate your Kudos
Follow me on LinkedIn linkedIn
Vote for my Community Mobile App Idea

Proud to be a Super User!




View solution in original post

Anonymous
Not applicable

Hi @amtbew ,

If you want to put the result in the if function for judgment, just change the expression to:

InScopeSalesExists =
IF(
CALCULATE(
COUNTROWS('Store Sales'),
'Store Sales'[Sale Type] = "In Scope"
) > 0,
"Yes",
"No"
)

The final result is shown below.

vkaiyuemsft_0-1709187285802.png

If your Current Period does not refer to this, please clarify in a follow-up reply.

 

Best Regards,

Clara Gong

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Hi @amtbew ,

If you want to put the result in the if function for judgment, just change the expression to:

InScopeSalesExists =
IF(
CALCULATE(
COUNTROWS('Store Sales'),
'Store Sales'[Sale Type] = "In Scope"
) > 0,
"Yes",
"No"
)

The final result is shown below.

vkaiyuemsft_0-1709187285802.png

If your Current Period does not refer to this, please clarify in a follow-up reply.

 

Best Regards,

Clara Gong

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thanks, @Anonymous this works but I think I need a different approach. I don't think I included enough info about my situation so I'll mark this as solved and open a fresh request with a better description. 

Idrissshatila
Super User
Super User

Hello @amtbew ,

 

try the following

Column = CALCULATE(COUNTROWS('Store Sales'),'Store Sales'[Sale Type] = "In Scope")

Idrissshatila_0-1709152024508.png

 

 



Did I answer your question? Mark my post as a solution! Appreciate your Kudos
Follow me on LinkedIn linkedIn
Vote for my Community Mobile App Idea

Proud to be a Super User!




Thanks @Idrisshalita 

 

Any alternative to using Countrows? I tried to wrap it in an If statement to produce a true or false but received a circular reference. Hoping to use this column a True/false slicer.

 

 

 

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.