Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hello,
I have sales data in two tables: Fact Table + Accounts Table.
I am trying to create a calculated column in the accounts table, that is equal to "Big Account" if the customer has bought a certain product on the Fact Table, or "Small Account" if they did not buy that product.
I'm thinkinh I should do a variable that returns all the 'Big Accounts' and the calculated column should have a condition (IF?) that says: if Account in the list returned by variable, then = Big Account.
Can someone help me with sytnax?
The field Names:
Account[Account Name]
Account[Big Account?] = ???
Transactions[Account Name]
Transactions[Product Name]
thank you
Solved! Go to Solution.
Hi @ChPetru
you can try
VAR Amount =
SUMX (
FILTER(RELATEDTABLE(Transactions), Transactions[Product Name] = "ProductName"),
Transactions[Sales]
RETURN
IF ( Amont > 0, "Big", "Small )
)
Hi @ChPetru
you can try
VAR Amount =
SUMX (
FILTER(RELATEDTABLE(Transactions), Transactions[Product Name] = "ProductName"),
Transactions[Sales]
RETURN
IF ( Amont > 0, "Big", "Small )
)
Thank you, it works with one little tweak: instead of sumx I used countrows.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
10 | |
9 | |
8 | |
7 | |
6 |
User | Count |
---|---|
14 | |
13 | |
11 | |
9 | |
9 |