Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi all,
I have a similar table:
One row per order/ product/ option. I am trying to create a column which will filter orders that have:
1) different products
2) same products but different options
3) same product with same option
4) a mix of everything
There are only 3 products, but many options which can work for same product (i.e. xx can be for A,B or C products).
I tried to FILTER(EARLIER) but could not figure out how to invorporate all products or all options.
Hopefully I made myself clear 🙂
Any help will be much appreciated !
Solved! Go to Solution.
@Anonymous
Try this column
Column = VAR OrderProduct = COUNTROWS ( SUMMARIZE ( FILTER ( Table1, Table1[Order] = EARLIER ( Table1[Order] ) ), Table1[Product] ) ) VAR OrderProductOption = COUNTROWS ( SUMMARIZE ( FILTER ( Table1, Table1[Order] = EARLIER ( Table1[Order] ) ), Table1[Product], Table1[Option] ) ) VAR OrderOption = COUNTROWS ( SUMMARIZE ( FILTER ( Table1, Table1[Order] = EARLIER ( Table1[Order] ) ), Table1[Option] ) ) RETURN SWITCH ( TRUE (), OrderProductOption = 1, "Same", AND ( OrderProduct = 1, OrderProductOption > 1 ), "Mix Option", AND ( OrderOption = 1, OrderProduct > 1 ), "Mix Product", "Mix All" )
@Anonymous
Try this column
Column = VAR OrderProduct = COUNTROWS ( SUMMARIZE ( FILTER ( Table1, Table1[Order] = EARLIER ( Table1[Order] ) ), Table1[Product] ) ) VAR OrderProductOption = COUNTROWS ( SUMMARIZE ( FILTER ( Table1, Table1[Order] = EARLIER ( Table1[Order] ) ), Table1[Product], Table1[Option] ) ) VAR OrderOption = COUNTROWS ( SUMMARIZE ( FILTER ( Table1, Table1[Order] = EARLIER ( Table1[Order] ) ), Table1[Option] ) ) RETURN SWITCH ( TRUE (), OrderProductOption = 1, "Same", AND ( OrderProduct = 1, OrderProductOption > 1 ), "Mix Option", AND ( OrderOption = 1, OrderProduct > 1 ), "Mix Product", "Mix All" )
@Anonymous
Please see attached file as well
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
117 | |
104 | |
77 | |
73 | |
52 |
User | Count |
---|---|
145 | |
109 | |
109 | |
90 | |
64 |