Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers!
Enter the sweepstakes now!Prepping for a Fabric certification exam? Join us for a live prep session with exam experts to learn how to pass the exam. Register now.
I have a dashboard I want to create where a user selects (from a drop down slicer) a Product then from Criteria Color and Size ..... then a table next to the slicer returns "similar" products.
Example1: User selects slicerProduct: B (which is color red and size 2) then selects slicerCriteria: Color and Size. Table next to the slicer returns all Products that are red and also size 2 ---------> (B and E)
Example2: User selects slicerProduct: A (which is color green and size 1 and Cost 1000) then selects slicerCriteria: Color, Size and Cost. Table next to the slicer returns all Products that are green and also size 1 and Cost 1000 ---------> (A, C and F)
Example3 User selects slicerProduct: A (which is color green and size 1 and Cost 1000.....) then selects slicerCriteria: Color, Size, Cost and Marked. Table next to the slicer returns all Products that are green and also size 1 and Cost 1000 and Marked Alex ---------> (A, and F)
DataTable:
ProductColorSizeCostMarked
|
I have tried to write this measure:
similarProduct =
var _colors=CALCULATETABLE(VALUES('DataTable'[Color]),FILTER(ALLSELECTED('DataTable'),'DataTable'[Product]=SELECTEDVALUE('slicerProduct'[Product])))
var _size=CALCULATETABLE(VALUES('DataTable'[Size]),FILTER(ALLSELECTED('DataTable'),'DataTable'[Product]=SELECTEDVALUE('slicerProduct'[Product])))
var _cost=CALCULATETABLE(VALUES('DataTable'[Cost]),FILTER(ALLSELECTED('DataTable'),'DataTable'[Product]=SELECTEDVALUE('slic rProduct'[Product])))
var _marked=CALCULATETABLE(VALUES('DataTable'[Marked]),FILTER(ALLSELECTED('DataTable'),'DataTable'[Product]=SELECTEDVALUE('slicerProduct'[Product])))
return
CALCULATE(MAX('DataTable'[Product]),FILTER('DataTable', 'DataTable'[Color] in _colors &&
'DataTable'[Size] in _size &&
'DataTable'[Cost] in _cost &&
'DataTable'[Marked] in _marked
))
but it works partially, how can I extend my measure so that also I can use slicerCriteria with slicetProduct to get similar Products.
slicerCriteria:
Criteria
|
slicerProduct:
Product
|
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
Do not include sensitive information or anything not related to the issue or question.
If you are unsure how to upload data please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
Please show the expected outcome based on the sample data you provided.
Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...
Check out the April 2025 Power BI update to learn about new features.
Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.
User | Count |
---|---|
72 | |
67 | |
65 | |
42 | |
42 |
User | Count |
---|---|
46 | |
38 | |
28 | |
26 | |
26 |