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 all ,
I need your help please
I have two tables - orders and products category
products culumns category , sub_category , product_id ( product_id can be in many sub_categories)
orders culumns - cust_id , order_date ,product_id , category , sub_category
how can I create a measure that showes only orders of products that have more than one sub_category ?
no ...i need it to create a relation between the tables so on could filter the other
You can't create a relationship between 2 tables on many columns. Secondly, slicing Orders by category and sub_category should be carried out via Products where these columns (should) reside. Please note that slicing should NEVER be done directly on a fact table, only via dimensions. If you don't follow the rules, you'll be sorry rather sooner than later. Even better, you'll be creating complex and potentially slow DAX which at times will return wrong results without you even realizing this.
Consider yourself warned (for your own good).
Best
D
The filter is by the category (pk)
anyone knowes how to create this DAX ?
Something along the lines of:
Measure =
VAR __Products =
FILTER(
GROUPBY(
'products culumns',
[product_id],
"Count",COUNTX(CURRENTGROUP(),[sub_category])
),
[Count]>1
)
RETURN
<some calculation where FILTER('orders culumns',[product_id] IN __Products) >
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 |
---|---|
12 | |
9 | |
9 | |
6 | |
5 |
User | Count |
---|---|
19 | |
18 | |
9 | |
9 | |
8 |